read_dd_file: Read data dictionary file

Description Usage Arguments Details Value

View source: R/read_functions.R

Description

Read data dictionary file

Usage

1
2
read_dd_file(filename, remove_empty_row = TRUE,
  remove_empty_col = FALSE)

Arguments

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

Details

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.

Value

A data frame from the file


UW-GAC/dbgaptools documentation built on April 30, 2019, 9:41 p.m.