arrange: Arrange rows by variables.

Description Usage Arguments Value Locales See Also Examples

View source: R/manip.r

Description

Use desc to sort a variable in descending order. Generally, this will not also automatically order by grouping variables.

Usage

1
2
3
arrange(.data, ...)

arrange_(.data, ..., .dots)

Arguments

.data

A tbl. All main verbs are S3 generics and provide methods for tbl_df, tbl_dt and tbl_sql.

...

Comma separated list of unquoted variable names. Use desc to sort a variable in descending order.

.dots

Used to work around non-standard evaluation. See vignette("nse") for details.

Value

An object of the same class as .data.

Data frame row names are silently dropped. To preserve, convert to an explicit variable.

Locales

Note that for local data frames, the ordering is done in C++ code which does not have access to the local specific ordering usually done in R. This means that strings are ordered as if in the C locale.

See Also

Other single.table.verbs: filter, mutate, select, slice, summarise

Examples

1
2
arrange(mtcars, cyl, disp)
arrange(mtcars, desc(disp))

sctyner/dplyr050 documentation built on May 17, 2019, 2:22 p.m.