Skip to content

Instantly share code, notes, and snippets.

@JoFrhwld
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoFrhwld/456c6b1e2a424f6f0db2 to your computer and use it in GitHub Desktop.
Save JoFrhwld/456c6b1e2a424f6f0db2 to your computer and use it in GitHub Desktop.
This is either awesome or perverse.
libarary(plyr)
library(dplyr)
library(ggplot2)
baseball %>%
group_by(year)%>%
summarise(r=sum(r)) %>%
ggplot(., aes(year, r)) +
geom_point()
# at least this doesn't work
# baseball %>%
# group_by(year, lg)%>%
# summarise(r=sum(r)) %>%
# ggplot(. %>%
# summarise(r = sum(r)), aes(year, r)) +
# geom_point()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment