https://github.com/hadley/dplyr
Raw File
Tip revision: 2b488e0d0d23282e625570989a825291651b5ece authored by Davis Vaughan on 29 April 2020, 14:21:31 UTC
Simplify `dplyr_reconstruct()` (#5160)
Tip revision: 2b488e0
desc.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/desc.r
\name{desc}
\alias{desc}
\title{Descending order}
\usage{
desc(x)
}
\arguments{
\item{x}{vector to transform}
}
\description{
Transform a vector into a format that will be sorted in descending order.
This is useful within \code{\link[=arrange]{arrange()}}.
}
\examples{
desc(1:10)
desc(factor(letters))

first_day <- seq(as.Date("1910/1/1"), as.Date("1920/1/1"), "years")
desc(first_day)

starwars \%>\% arrange(desc(mass))
}
back to top