Last active
April 15, 2016 17:23
-
-
Save sahirbhatnagar/4db246dd767eabb204eead836b29cd44 to your computer and use it in GitHub Desktop.
This file contains 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
### Boxplot of {{k}} by number of cylinders | |
```{r boxplot-by-cyl-{{j}}, eval=TRUE} | |
ggplot(mtcars, | |
aes(x = cyl, y = {{j}}, | |
fill = cyl)) + | |
geom_boxplot() + | |
theme_bw() + | |
theme(legend.position = "bottom") + | |
xlab("") + | |
ylab(paste(quote({{j}}))) | |
``` | |
### Boxplot of {{k}} by number of cylinders and transmission | |
```{r boxplot-by-cyl-am-{{j}}, eval=TRUE} | |
ggplot(mtcars, | |
aes(x = cyl, y = {{j}}, | |
fill = cyl)) + | |
geom_boxplot() + | |
facet_grid(~am) + | |
theme_bw() + | |
theme(legend.position = "bottom") + | |
xlab("") + | |
ylab(paste(quote({{j}}))) | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment