is there a way to get all the label attributes of columns in r?

Does this answer your question?

Q1 = runif(5)
Q2 = runif(5)

attributes(Q1)$label <- c("What is your age?")
attributes(Q2)$label <- c("What is your name?")


df <- data.frame(Q1, Q2)

purrr::map_df(df, ~attributes(.x)) %>%
  bind_cols(names = names(df), .)

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top