Parse vocabulary from a set of names

parse_stubs(names, sep = "_", sort = FALSE)

Arguments

names

Names created by vocabulary as character vector

sep

Separator between different levels of name

sort

Whether to sort stubs (within a level) by decreasing order of occurrence

Value

List of class convomin to represent controlled vocabulary

Examples

vbl_names <- c("ind_a", "ind_b", "amt_a", "amt_c", "cat_c_pre", "cat_c_post") parse_stubs(vbl_names, sep = "_")
#> Level 1 #> - amt #> - cat #> - ind #> Level 2 #> - a #> - b #> - c #> Level 3 #> - post #> - pre