strengejacke / sjlabelled

Working with Labelled Data in R
https://strengejacke.github.io/sjlabelled
84 stars 11 forks source link

Quasi-quotation for get_label function #33

Open marianschmidt opened 4 years ago

marianschmidt commented 4 years ago

Since var_labels and val_labels are supporting quasiquotation now, I was wondering whether there should also be support within the get_label function or a get_label equivalent that supports quasiquotation to use this function inside own funtions?

df %>% sjlabelled::get_label(!!var_name)

marianschmidt commented 4 years ago

The current workaround, that I am using is

attr(df[[rlang::eval_tidy(var_name)]], "label", exact = T)