R/describe.R
describe_names.Rd
Create dictionary defining controlled vocabulary realizations
describe_names(vars, convo, desc_str = "{level1} of entity {level2}")
vars | Character vector of variable names |
---|---|
convo | Controlled vocabulary object |
desc_str | Prototypical string from which to create variable definition |
data.frame
data dictionary
vars <- c("AMT_A_2019", "IND_B_2020") filepath <- system.file("", "ex-convo.yml", package = "convo") convo <- read_convo(filepath) describe_names(vars, convo, desc_str = "{level1} of {level2} in given year")#> var_name level1 level2 level3 #> 1 AMT_A_2019 AMT A 2019 #> 2 IND_B_2020 IND B 2020 #> desc #> 1 Non-negative, summable quantity of Type A in given year #> 2 Binary indicator of NA in given year