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

Questions about gh_repos

You're going to use gh_repos again, a list where each element is information about a GitHub repository. Here you will use map() and map_dbl() to answer the question:

  • Which repository is the largest?'

GitHub repository size is measured in megabytes. This information could be useful to document if you are working with a list based dataset that changes over time, and need to be able to pull out information, like the largest repository, in the most recent dataset.

Bu egzersiz

Foundations of Functional Programming with purrr

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

Egzersiz talimatları

  • map() over gh_repos.
  • map_dbl() over the `"size" element.
  • Then map() to determine which repo is the largest.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Map over gh_repos to generate numeric output
map(___, 
    ~map___(___, 
             ~___[[___]])) %>%
    # Grab the largest element
    map(~max(___))
Kodu Düzenle ve Çalıştır