csci297b Exercise 9 ggplot2 (Solution)

$ 20.99
Category:

Description

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

Reviews

There are no reviews yet.

Be the first to review “csci297b Exercise 9 ggplot2 (Solution)”

Your email address will not be published. Required fields are marked *