| downloadFiles {NHANES.RAW80Hz} | R Documentation |
Download (non-raw) data files and save them as a different file type.
downloadFiles(destDir, data, files=NULL, save.type="csv")
destDir |
Destination folder to download the files. |
data |
One of "2011-12", "2013-14", or "NNYFS". |
files |
Character vector of files to download. They must be strings from
the |
save.type |
One of "xpt", "csv", or "rda", where "xpt" denotes a SAS transport file,
"csv" denotes a comma separated file, and "rda" denotes an R object file
that is saved using the |
The file names of the saved data will be prefixed with data and contain
the value of the File column in the data frame from getDataFileInfo.
This function will not download the (large) raw accelerometer data. For that,
the function downloadAcclRawData80Hz must be used.
NULL
getDataFileInfo, downloadAcclRawData80Hz, downloadAndReadFile
data <- "NNYFS"
# Look up all possible files to download
x <- getDataFileInfo(data)
x[, 1:2]
# Download files "Cardiovascular Fitness", and "Plank" (rows 3 and 11 of above data frame)
files <- c("Cardiovascular Fitness", "Y_PLX")
destDir <- "./"
## Not run:
downloadFiles(destDir, data, files=files)
## End(Not run)