r/backtickbot • • May 16 '21

https://np.reddit.com/r/Rlanguage/comments/ndjho4/looping_with_dplyr_a_question_and_a_follow_up/gyb5ivi/

library(tidyverse)

df %>% select(State, Marital_Status, Age_Group, Educ_Level, Housing_Type) %>%
   pivot_longer(everything(), names_to = "factor", values_to = "level") %>%
   count(factor, level)
0 Upvotes

0 comments sorted by