ComeçarComece de graça

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?

Este exercício faz parte do curso

Linear Algebra for Data Science in R

Ver curso

Exercício interativo prático

Transforme a teoria em ação com um de nossos exercícios interativos

Começar o exercício