setwd("C:/Users/Michael/Desktop/OCS/OCSdata")
setwd("C:/Users/Michael/Desktop/OCS/testing123")
casestudy = 'ocs-bp-RTC-wrangling'
repo_url = paste0("https://api.github.com/repos/opencasestudies/",
casestudy, "/git/trees/master?recursive=1") # creating repo url string
repo = GET(url=repo_url)
library(purrr)
library(httr)
casestudy = 'ocs-bp-RTC-wrangling'
repo_url = paste0("https://api.github.com/repos/opencasestudies/",
casestudy, "/git/trees/master?recursive=1") # creating repo url string
repo = GET(url=repo_url)
repocont = content(repo)
repounlist = unlist(repocont, recursive = FALSE)
paths = map(repounlist,'path') # creating list of just the file paths in the repo
paths = paths[!sapply(paths,is.null)] # removing null values
paths
casestudy = 'ocs-bp-RTC-wrangling'
repo_url = paste0("https://api.github.com/repos/opencasestudies/",
casestudy, "/git/trees/master?recursive=1") # creating repo url string
repo = GET(url=repo_url)
repocont = content(repo)
repounlist = unlist(repocont, recursive = FALSE)
paths = map(repounlist,'path') # creating list of just the file paths in the repo
paths = paths[!sapply(paths,is.null)] # removing null values
paths
setwd("C:/Users/Michael/Desktop/OCS/testing123")
download.file('https://raw.githubusercontent.com/opencasestudies/ocs-bp-RTC-wrangling/master/data/raw/Demographics/Decade_1990/sasrh90.txt',method='curl')
download.file('https://raw.githubusercontent.com/opencasestudies/ocs-bp-RTC-wrangling/master/data/raw/Demographics/Decade_1990/sasrh90.txt',destfile=file.path(getwd(),'data/raw/Demographics/Decade_1990/sasrh90.txt'), method='curl')
??grepl
grepl('.',"data/raw/Crime",fixed = TRUE)
grepl('.',"data/raw/Crime/.DS_store",fixed = TRUE)
download.file('https://raw.githubusercontent.com/opencasestudies/ocs-bp-RTC-wrangling/master/data/raw/Demographics/Decade_1990/sasrh90.txt',destfile=file.path(getwd(),'sasrh90.txt'), method='curl')
library(OCSdata)
devtools::document()
library(OCSdata)
devtools::document()
library(OCSdata)
table?
sdf
??table
()
getwd()
devtools::build_vignettes()
devtools::build_vignettes()
devtools::document()
devtools::check_win_release()
devtools::check_win_devel()
readline()
readline()
paste("Error: No destination directory specified. Please enter the
file path for where the data files should be downloaded in
the 'outpath' argument.")
"Error: No destination directory specified. Please enter the
file path for where the data files should be downloaded in
the 'outpath' argument."
paste("Error: No destination directory specified. Please enter the file path for where the data files should be downloaded in the 'outpath' argument.")
library(OCSdata)
library(OCSdata)
devtools::document()
devtools::document()
library(OCSdata)
library(OCSdata)
library(OCSdata)
devtools::document()
library(OCSdata)
parent.frame()
devtools::document()
library(OCSdata)
casestudy = 'ocs-bp-co2-emissions'
casestudy = 'ocs-bp-opioid-rural-urban'
githuburl1 = paste0('https://github.com/opencasestudies/', casestudy, '/blob/master/', 'data/imported/county_annual.rda','?raw=true')
githuburl2 = paste0('https://github.com/opencasestudies/', casestudy, '/blob/master/', 'data/imported/county_pop_arcos.rda','?raw=true')
urls = c(url(githuburl1),url(githuburl2))
urls
url(githuburl1)
load(urls)
githuburls = c(githuburl1,githuburl2)
load(url(githuburls))
tempfile()
tempfile()
tempfile()
devtools::document()
devtools::document()
devtools::document()
library(OCSdata)
devtools::document()
devtools::document()
devtools::document()
devtools::document()
devtools::document()
library(OCSdata)
repo_names = c("ocs-bp-rural-and-urban-obesity", "ocs-bp-air-pollution",
"ocs-bp-vaping-case-study", "ocs-bp-opioid-rural-urban",
"ocs-bp-RTC-wrangling", "ocs-bp-RTC-analysis",
"ocs-bp-youth-disconnection", "ocs-bp-youth-mental-health",
"ocs-bp-school-shootings-dashboard", "ocs-bp-co2-emissions",
"ocs-bp-diet")
library(OCSdata)
cat(paste("Not a valid case study name. Please use the case study's GitHub
repository name. \nUse ?raw_data to view a list of valid names."))
cat(paste("Not a valid case study name. Please use the case study's GitHub",
"repository name. \nUse ?raw_data to view a list of valid names."))
cat(paste("Not a valid case study name. Please use the name of the case study \nGitHub repository",
"Use ?raw_data to view a list of valid names.")))
cat(paste("Not a valid case study name. Please use the name of the case study \nGitHub repository",
"Use ?raw_data to view a list of valid names."))
cat(paste("Not a valid case study name. Please use the name of the case study \nGitHub repository.",
"Use ?raw_data to view a list of valid names."))
library(OCSdata)
?clone_ocs
?clone_ocs_repo
library(OCSdata)
devtools::document()
tempfile()
devtools::build_vignettes()
devtools::build_vignettes()
