I would like to use values from a character vector that I created as label attributes for a set of variables in a dataframe.
I thought this simple solution should work, yet it does not:
x <- rep("text", time=19) %>%
paste(1:19, sep = " ") #character vector with names of label attributes I want
attr(mydataframe[var_names], "label") <- x #var_names and x have the same length
Thanks for your help!