Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
dplyr group_by and ggplot example
plot_df <-df %>% group_by(feature) %>%
do(
plots = ggplot(data = .) + aes(x = xcol, y = ycol) +
geom_point() + ggtitle(.$feature)
)
# show plots
plot_df$plots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment