desc | R Documentation |
Transform a vector into a format that will be sorted in descending order. This is useful within arrange()
.
desc(x)
x |
A vector to transform. |
A vector of the same length as x
.
desc(1:10)
desc(factor(letters))
first_day <- seq(as.Date("1910/1/1"), as.Date("1920/1/1"), "years")
desc(first_day)
mtcars %>% arrange(desc(mpg))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.