Intro Part 3

Arranging our Data

J-327D has seen you glimpse the data and select variables in starwars. He now wants to find the tallest character.

What function should you add to the code below to arrange the data so the tallest person is listed at the top? (Important note: Since tidyverse arranges numbers from the smallest to the greatest number, you may need another function so the information is in descending order.)

Solution
starwars |> select(name, height, homeworld, species) |> arrange(desc(height))
starwars |> 
  select(name, height, homeworld, species) |>   
  arrange(desc(height))
Hint

J-327D recommends checking out the arrange() function, which you can learn about here. Don’t forget to put your result in descending order.

JedR challenge

If J-327D asked you to write about the tallest being in the galaxy, who would it be?

Perhaps a towering Wookiee or a menacing Sith lord… Let’s see!

The tallest character is Yarael Poof with a height of 264 cm.

Not even the Death Star could stand in your way.

Once you’ve completed the exercises above, move to the next part of this trial.