Porfolio 4 : Interactive Homework 2

Author

Lilyanne Nyunt

Problem 6: ggridges

The ggplot2 package does not contain every possible graphic you might want to create. Sometimes you need to load an additional package that extends the functionality of ggplot2. For example, to create ridgeline plots you create density plots and stagger the categorical variable along the y-axis (See section 9.2 of Wilke for examples).

The ggridges package provides the geom_density_ridges() layer to construct this plot. Look at the help file by running ?geom_density_ridges after you load the package and then construct a ridgeline plot of the average daily temperatures in Minneapolis by month.

package 'ggridges' successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\lilya\AppData\Local\Temp\Rtmpkz9SKt\downloaded_packages

Problem 9: R4DS scatterplot

Complete Problem 4 in R4DS Ch 9.3.1 (The dataset is called mpg and is built-in to {ggplot2}, so you can access it whenever the {tidyverse} is loaded)