Description Usage Arguments Value Examples
download_nit()
downloads records from the New Interview Tool (NIT) project
download_nca()
downloads records from the New Case Assignment (NCA) project
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | download_nit(
api_token = Sys.getenv("redcap_NIT_token"),
headers = c("raw", "label"),
values = c("label", "raw"),
filter = NULL,
fields = c("record_id", "date", "numb_contacts_16", "start", "specimendate",
"case_interview_complete"),
dir = "V:/EPI DATA ANALYTICS TEAM/COVID SANDBOX REDCAP DATA/Data for R/nit/",
file = paste0("nit_data_", str_date(), ".csv"),
force = FALSE
)
download_nca(
api_token = Sys.getenv("redcap_NCA_token"),
headers = c("raw", "label"),
values = c("label", "raw"),
filter = NULL,
fields = NULL,
dir = "V:/EPI DATA ANALYTICS TEAM/COVID SANDBOX REDCAP DATA/Data for R/nca/",
file = paste0("nca_data_", str_date(), ".csv"),
force = FALSE
)
|
api_token |
|
headers |
|
values |
|
filter |
|
fields |
|
dir |
|
file |
|
force |
Should the download overwrite an existing file, if one exists?
The default is |
The path to the data as an fs_path
character vector
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
# Download the current NIT data
download_nit()
# Download NIT and load immediately
nit_data <- load_nit(download_nit())
# Do the same with pipe (`%>%`)
nit_data <- download_nit() %>% load_nit()
# Overwrite the previous file
download_nit(force = TRUE)
# Download NCA data
download_nca()
# Download NCA and overwrite previous file
nca_data <- download_nca() %>% load_nca()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.