arrange: Arrange entries in data.frame

View source: R/arrange.R

arrangeR Documentation

Arrange entries in data.frame

Description

Analogous function for arrange in dplyr.

Usage

arrange(.data, ..., cols = NULL, order = 1L)

Arguments

.data

data.frame

...

Arrange by what group? Minus symbol means arrange by descending order.

cols

For set_arrange only. A character vector of column names of .data by which to order. If present, override .... Defaults to NULL.

order

For set_arrange only. An integer vector with only possible values of 1 and -1, corresponding to ascending and descending order. Defaults to 1.

Details

Once arranged, the order of entries would be changed forever.

Value

A data.table

See Also

arrange, setorder

Examples


a = as.data.table(iris)
a %>% arrange(Sepal.Length)
a
a %>% arrange(cols = c("Sepal.Width","Petal.Length"))
a


tidyft documentation built on Jan. 9, 2023, 1:27 a.m.