Updates a variable details worksheet with metadata from a DDI document. New rows are added for missing categories and columns that are empty are updated with values from the document. No information from the worksheet is overwritten.

ProcessDDIVariableDetails(ddi, variableDetails)

Arguments

ddi

A string that is the file path to the DDI document

variableDetails

A data frame containing a variable details worksheet

Value

A dataframe containing the updated variable details worksheet

Examples

library(bllflow) pbcDDI <- bllflow::ReadDDI(system.file("extdata", "", package="bllflow"), "pbcDDI.xml") variableDetails <- read.csv(system.file("extdata", "PBC-variableDetails.csv", package="bllflow")) populatedDetails <- ProcessDDIVariableDetails(pbcDDI, variableDetails)
#> Warning: Row 2 : valueLabelStart column has value " male " but DDI value is " Male ". Not overwriting
#> Warning: Row 1 : valueLabelStart column has value " female " but DDI value is " Female ". Not overwriting
#> Warning: Row 9 : valueLabelStart column has value " No edema " but DDI value is " edema despite diuretic therapy ". Not overwriting
#> Warning: Row 9 : label column has value " Edema " but DDI value is " edema ". Not overwriting
#> Warning: Row 9 : low column has value " 0 " but DDI value is " 1 ". Not overwriting
#> Warning: Row 9 : high column has value " 0 " but DDI value is " 1 ". Not overwriting