# NOT RUN {
data(efc)
# find variables with "cop" in variable name
find_var(efc, "cop")
# return tibble with matching variables
find_var(efc, "cop", as.df = TRUE)
# or return "summary"-tibble with matching variables
# and their variable labels
find_var(efc, "cop", as.varlab = TRUE)
# find variables with "dependency" in names and variable labels
library(sjlabelled)
find_var(efc, "dependency")
get_label(efc$e42dep)
# find variables with "level" in names and value labels
res <- find_var(efc, "level", search = "name_value", as.df = TRUE)
res
get_labels(res, attr.only = FALSE)
# use sjPlot::view_df() to view results
# }
# NOT RUN {
library(sjPlot)
view_df(res)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab