Part 3: `ggplot2`, factors, boxplots, `dplyr`: subsetting using `filter()`/`select()`
Required
ggplot2
- ggplot2 BERD workshop slides - lots more on different
geoms
and how to customize plots
dplyr
dplyr
cheatsheet - one of the best references.- Combining functions using the pipe operator, %>% - if you’re confused about
%>%
, please read this.
Optional
Customizing ggplot2
If you are interested in learning more about ggplot:
- Themes to improve your ggplot figures by David Keyes is really helpful for learning how to do more styling.
- RStudio also publishes a ggplot cheat sheet that is really handy!
- Customizing ggplot2 Cheatsheet is also handy, because it organizes ggplot2 commands by task.
- Documentation for all
ggplot
features is available here.
Using tidyselect
(Intermediate Level)
Remember, select()
works on columns.
tidyselect
lets you select columns by matching names. In conjunction with the across()
command, you can apply the same operation to multiple columns at once. This is especially handy when you need to produce a summary on all numeric columns.
You can run the tidyselect
tutorial by running the code in your Rstudio cloud console:
library(tidyowl)
learn_tidyselect()