Get startedGet started for free

Who Was the Champion?

The dplyr package has been loaded for you, as has the solution to the previous question. The arrange() function in dplyr allows you to re-order a vector based on a trait.

In the previous exercise, you rated the teams at the end of the 2017 WNBA season using the solution to a matrix-vector equation.

Using the the syntax

arrange(r, -Rating)

we can see which team was the best in the WNBA in 2017 (using the negative ("-") sign in front of the ordering variable ("Rating") puts the values in descending order, as opposes to ascending order if just "Rating" is used).

Which team was the best?

This exercise is part of the course

Linear Algebra for Data Science in R

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise