VarNamesToDT: Return root names and NonID-qualifier values of compound...

Description Usage Arguments Value Examples

View source: R/VarNamesToDT.R

Description

VarNamesToDT returns a data.table identifying those qualifiers corresponding to the values appearing in the compound variable names specified in the input parameter VarNames.

This function is designed for variable names with suffixes appending qualifier values with underscores _.

The function determines the correspondind qualifier names for the values contained in the compound variable names using the information from the DD object specified as the second input parameter.

VarNamesToDD has been designed fundamentally for internal use in the construction of editing strategies, but it can also be of utility in some scripts.

Usage

1
VarNamesToDT(VarNames, DD)

Arguments

VarNames

Character vector with the compound variable names.

DD

Object of class DD with the definition and properties of the variables.

Value

data.table with as many rows as the length of VarNames, with the column IDDD containing the root name and one more column for each suffix in the compound input name under the corresponding qualifier name. The resulting data.table contains the values of each qualifier for each input variable name.

Examples

1
2
data(ExampleDD)
VarNamesToDT(c('Employees_1.'), ExampleDD)

david-salgado/StQ documentation built on Aug. 12, 2021, 3:23 p.m.