README.md

survey(s)

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.

Install

remotes::install_github('kklot/surveys')
library(survey)

Usage

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')

How to contributes

TODO:



kklot/surveys documentation built on Feb. 19, 2022, 11:37 p.m.