LoslegenKostenlos loslegen

Boxplots and violin plots

This exercise will continue giving you experience making plots using the ggplot2 package. The ggplot2 package has already been loaded for this exercise. You will explore including both a categorical variable sex with a continuous variable shuckedWeight from the abalone dataset to make clustered boxplots using geom_boxplot() and violin plots using geom_violin() which are useful to visualize distributions better than boxes. Themes can also be added to change the style of the plot (color, fonts, grid, etc) using ggplot2 functions like theme_bw().

The abalone dataset, dplyr and ggplot2 packages have been loaded for you.

Diese Übung ist Teil des Kurses

R For SAS Users

Kurs anzeigen

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Create graphical environment for sex and shuckedWeight
ggplot(data = ___, aes(___, ___))
Code bearbeiten und ausführen