Description Usage Arguments Value Examples
View source: R/create_datasets.R
Creates a simple data dictionary based on variable labels for each NHANES file
1 | load_labs_merge(vec_of_files = NULL, yr, data_dir = "./data")
|
vec_of_files |
The character vector of files to be retrieved. The "demo" file is ALWAYS included, and should NOT be specified. |
yr |
The year for which the file should be extracted. |
data_dir |
The directory in which all of your NHANES subdirectories (one for each year) reside. Default is the project "data" subdirectory (i.e., "./data") but if your data are elsewhere, you must specify the directory. Keep in mind that this will be a directory that contains all of your NHANES subdirectories. It is NOT the subdirectory for a specific year. Do not use a slash (/) at the end. |
Returns a dataframe (a data.table) of all of the labels from each file in the character vector, including "demo".
1 2 3 4 5 | ## Not run:
# Load label files listed in character vector
full_labels <- load_labs_merge(listing, 2003)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.