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

Joining themes to their grandchildren

We can go a step further than looking at themes and their children. Some themes actually have grandchildren: their children's children.

Here, we can inner join themes to a filtered version of itself again to establish a connection between our last join's children and their children.

Bu egzersiz

Joining Data with dplyr

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

Egzersiz talimatları

  • Use another inner join to combine themes again with itself.
    • Be sure to use the suffixes "_parent" and "_grandchild" so the columns in the resulting table are clear.
    • Update the by argument to specify the correct columns to join on. If you're unsure of what columns to join on, it might help to look at the result of the first join to get a feel for it.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Join themes to itself again to find the grandchild relationships
themes %>% 
  inner_join(themes, by = c("id" = "parent_id"), suffix = c("_parent", "_child")) %>%
  ___
Kodu Düzenle ve Çalıştır