Starting from:

$24.99

CSCI297B Exercise 9 Solution

For this project, use the tidyverse library, which includes the mpg dataset.
For this project, you will turn in a single R markdown file, called exercise09.Rmd
1. What geom would you use to draw a line chart? A boxplot? A histogram? An area chart?
2. Earlier in this chapter we used show.legend without explaining it:
ggplot(mpg, aes(x = displ, y = hwy)) +
geom_smooth(aes(color = drv), show.legend = FALSE)
What does show.legend = FALSE do here? What happens if you remove it? Why do you think we used it earlier?
3. What does the se argument to geom_smooth() do?
4. Recreate the R code necessary to generate the following graphs. Note that wherever acategorical variable is used in the plot, it’s drv.

1

More products