Description Usage Arguments Details Value
View source: R/read_functions.R
Read data dictionary file
1 2 | read_dd_file(filename, remove_empty_row = TRUE,
remove_empty_col = FALSE)
|
filename |
The path to the file on disk |
remove_empty_row |
Logical of whether to exclude empty (i.e. all missing values) rows. Defaults to TRUE |
remove_empty_col |
Logical of whether to exclude empty (i.e. all missing values) rowcolumns. Defaults to FALSE |
Expects (tab-delimited) .txt, .xlsx, or .xml file.
For .txt and .xlsx files, dbGaP data dictionary files should have column headers as the first row. If the input violates this, e.g. additional header rows are present, a warning is returned but the file is still read in.
.xml file types should be those provided by dbGaP.
Only a subset ofpossible child nodes of a variable node are processed:
type
unit
logical_min
logical_max
These names are converted to the names expected in a user-submitted data dictionary.
Finally, if any variables are flagged as "unique keys", a column is added to the output data frame and populated correctly (with X's).
Otherwise, the "UNIQUEKEY" column does not exist in the output.
A data frame from the file
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.