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

Tidy Big Tables

As a final exercise of using the "tidyverse" packages in combination with the "bigmemory" suite of packages, you will again use the tidyr and ggplot2 packages to plot the Borrower Income ratio over time.

Bu egzersiz

Scalable Data Processing in R

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Load the tidyr and ggplot2 packages.
  • Use the pivot_longer() function to gather the counts by year.
  • Create a line plot with Year on the x-axis and Count on the y-axis. Color and group by BIR.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Load the tidyr and ggplot2 packages
library(___)
library(___)

bir_df_wide %>% 
    # Transform the wide-formatted data.frame into the long format
    ___(-BIR, names_to = "Year", values_to = "Count") %>%
    # Use ggplot to create a line plot
    ggplot(aes(x = ___, y = ___, group = BIR, color = BIR)) + 
    ___
Kodu Düzenle ve Çalıştır