Conversation
| - handsome default settings | ||
| - snap-together building blocks | ||
| - automatic legends, colors, facets | ||
| - statistical overlays |
There was a problem hiding this comment.
I'm not sure if people will understand what these bullet points mean. Are we assuming that they have experience with base R graphics?
| geom_point(aes(x = Depth, y = CTD_O2)) | ||
| ``` | ||
|
|
||
| Let's check your understanding by visualizing the realtionship between depth and methane using a dot plot. The resulting plot should look like this: |
There was a problem hiding this comment.
| Let's check your understanding by visualizing the realtionship between depth and methane using a dot plot. The resulting plot should look like this: | |
| Let's check your understanding by visualizing the relationship between depth and methane using a dot plot. The resulting plot should look like this: |
| labs(x="Depth [m]", y="Oxygen [uM]") | ||
| ``` | ||
|
|
||
| Change the point shape. Similar to color, this can be a single shape or mapped to a variable: |
There was a problem hiding this comment.
Mapping colour to a variable wasn't addressed above, so might be best to not bring it up here. You could also cover it in the previous section, though, since it is useful to know.
| Change the point shape. Similar to color, this can be a single shape or mapped to a variable: | ||
| ```{r example4, exercise=TRUE} | ||
| ggplot(dat, aes(x = Depth, y = CTD_O2)) + | ||
| geom_point(alpha = 0.5, shape = 17) + |
There was a problem hiding this comment.
Mention that shapes are specified using numbers and provide a link to where they can find the corresponding numbers for shapes.
| labs(x="Depth [m]", y="Oxygen [uM]") | ||
| ``` | ||
|
|
||
| We can summarize the multiple data points as a boxplot by adding the line "geom_boxplot()": |
There was a problem hiding this comment.
Can we assume that they know how to read boxplots? Only asking because we had to go over them last week in my 400-level lab course haha
|
|
||
| A list of shape codes can be found [here](http://sape.inf.usi.ch/quick-reference/ggplot2/shape). | ||
|
|
||
| Change the overall look with a theme: |
| labs(x="Depth [m]", y="Oxygen [uM]") | ||
| ``` | ||
|
|
||
| We can visualize the overall mean of all O~2~ values with a horizontal line: |
There was a problem hiding this comment.
Maybe give a brief rationale on why someone should do this (ie. why is denoting where the mean is with a line important)
|
|
||
| * Create dot and box plots in `ggplot2` | ||
| * Modify attributes of ggplots | ||
| * Complete and interpret the output of ANOVAs in R |
There was a problem hiding this comment.
ANOVA isn't actually covered in this tutorial
| * Complete and interpret the output of ANOVAs in R | ||
|
|
||
| ## Setup | ||
| Prior to starting this tutorial, please complete the *Pre-module download assignment* to obtain all the necessary software and data. |
There was a problem hiding this comment.
Is this tutorial a part of a larger curriculum? Where do students go to access the pre-module download assignment?
|
|
||
| Read `4.MICB301_stats_extend_data.csv` into R using `read_csv` and save as `raw_dat`. | ||
| ```{r} | ||
| raw_dat <- geochemicals |
There was a problem hiding this comment.
I think it's confusing to tell students to save the csv file as raw_dat, but the code saves the object geochemicals to raw_dat instead
| ## Explore the metadata | ||
| In addition to measurements of microbial communities, you also have geochemical data for the Saanich Inlet samples. For a brief introduction to these data, see Hallam SJ et al. 2017. Monitoring microbial responses to ocean deoxygenation in a model oxygen minimum zone. Sci Data 4: 170158 [doi:10.1038/sdata.2017.158](https://www.nature.com/articles/sdata2017158). | ||
|
|
||
| A subset of these data has been provided in `4.MICB301_stats_extend_data.csv` on Canvas including: |
There was a problem hiding this comment.
Also list "Depth" here since you talk about it in the next section
|
|
||
| Using the `%in%` binary operator we can filter for groups of values. Subset data to 3 depths in 7 cruises (i.e. specimens) in February: | ||
| ```{r} | ||
| dat <- filter(dat, Depth %in% c(10, 100, 200), |
There was a problem hiding this comment.
I think it would be nice to have this part be an interactive exercise (assuming we expect students to know basic data wrangling skills)
|
|
||
| A subset of these data has been provided in `4.MICB301_stats_extend_data.csv` on Canvas including: | ||
|
|
||
| - Depth: depth in meters |
There was a problem hiding this comment.
Might want to explain why you ended up converting this to a factor
#13 adds interactive code chunks and progressive exercises