Session Ready
Exercise

Setting names

Setting list names makes working with lists much easier in many scenarios; it makes the code easier to read, which is especially important when reviewing code weeks or months later.

Here you are going to work with the gh_repos and gh_users datasets and set their names in two different ways. The two methods will give the same result: a list with named elements.

Instructions
100 XP
  • Set the names on gh_users using the "name" element and use the map_*() function that outputs a character vector.
  • Explore the structure of gh_repos to see where the owner info is stored.
  • Set the names of a new list gh_repos_named based on the login of the owner of the repo, using the set_names() and map_*() functions.