Hi @brad.cannell,
You're almost there, just need to add an x
to get it to work:
purrr::map_df(vars, ~{
mtcars %>%
group_by(!! .x) %>%
summarise(mean(mpg))
})
Hi @brad.cannell,
You're almost there, just need to add an x
to get it to work:
purrr::map_df(vars, ~{
mtcars %>%
group_by(!! .x) %>%
summarise(mean(mpg))
})