CommencerCommencer gratuitement

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?

Cet exercice fait partie du cours

Linear Algebra for Data Science in R

Afficher le cours

Exercice interactif pratique

Passez de la théorie à la pratique avec l’un de nos exercices interactifs

Commencer l’exercice