Created
July 11, 2016 19:56
-
-
Save ctufts/eaca046a72af650a9b12f9751d95ff8d to your computer and use it in GitHub Desktop.
dplyr group_by and ggplot example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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