downloadAndReadFile {NHANES.RAW80Hz}R Documentation

Download a file into a data frame

Description

Download a single (non-raw) data file and return a data frame containing the data

Usage

 downloadAndReadFile(data, file, delete=TRUE)

Arguments

data

One of "2011-12", "2013-14", or "NNYFS".

file

A single file to download and read. It must be a string from the Name or File column in the returned data frame from getDataFileInfo.

delete

TRUE or FALSE to delete the downloaded file after it is read into a data frame. The default is TRUE.

Details

This function will not download the (large) raw accelerometer data. For that, the function downloadAcclRawData80Hz must be used. The file will be downloaded to the working directory (getwd).

Value

A data frame containing the data.

See Also

getDataFileInfo, downloadFiles

Examples


  ## Not run: 
    data1 <- downloadAndReadFile("2011-12", "Tuberculosis")
    data1[1:5, ]
    data2 <- downloadAndReadFile("2013-14", "DXXFRX_H")
    data2[1:5, ]
  
## End(Not run)


[Package NHANES.RAW80Hz version 0.0.3 Index]