BaşlayınÜcretsiz başlayın

Plot selection

Consider two other columns in the cars dataset: city_mpg and width. Which is the most appropriate plot for displaying the important features of their distributions? Remember, both density plots and box plots display the central tendency and spread of the data, but the box plot is more robust to outliers.

Bu egzersiz, kursun bir parçasıdır

Exploratory Data Analysis in R

Kursa Göz Atın

Egzersiz talimatları

Use density plots or box plots to construct the following visualizations. For each variable, try both plots and submit the one that is better at capturing the important structure.

  • Display the distribution of city_mpg.
  • Display the distribution of width.

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

# Create plot of city_mpg
cars %>%
  ggplot(___) +
  ___

# Create plot of width
cars %>% 
  ggplot(___) +
  ___
Kodu Düzenle ve Çalıştır