Returns a list of dataDscr nodes from a DDI document which represent variables provided in the varList argument

GetDDIVariables(ddi, varList)

Arguments

ddi

A named list returned by the ReadDDI function

varList

A list of strings that represents variable names

Value

Returns a list containing the dataDscr nodes from the DDI document, each one of which matches with an entry in the varList argument

Examples

library(bllflow) pbcDDI <- bllflow::ReadDDI(system.file("extdata", "", package="bllflow"), "pbcDDI.xml") varsForPBC <- bllflow::GetDDIVariables(pbcDDI, c("age", "sex")) print(attr(varsForPBC[[1]], 'name'))
#> [1] "age"
print(varsForPBC[[1]]$labl)
#> [[1]] #> [1] "\nin years\n" #>