sjlabelled icon indicating copy to clipboard operation
sjlabelled copied to clipboard

Quasi-quotation for get_label function

Open marianschmidt opened this issue 5 years ago • 1 comments

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 avatar Feb 13 '20 17:02 marianschmidt

The current workaround, that I am using is

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

marianschmidt avatar Feb 13 '20 17:02 marianschmidt