Collection of surveys meta data such as variable name, label, file name, etc. and provides a R6 class interface to interact with the meta data, mainly query variable names.
remotes::install_github('kklot/surveys')
library(survey)
Generate a new surveys
object, only MICS women and men metadata is here now.
mics <- MICS$new()
List meta data variables
mics$variables()
Tabulate
mics$table('sex')
Find rows match pattern in a varable, extract dataset's variable name
mics$find_in_col(col='sex', what='female', show = 'name')
Find in label by regex pattern, optionally extract a column, default to using perl
for advanced queries such as look ahead.
mics$find_in_label(what='^(?!ever|reason).*ever had sex', show='label')
Find in survey's variables name by regex pattern.
mics$find_in_name('00')
inst/extdata
TODO:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.