powered by
Analogous function for arrange in dplyr.
arrange
arrange(.data, ..., cols = NULL, order = 1L)
A data.table
data.frame
Arrange by what group? Minus symbol means arrange by descending order.
For set_arrange only. A character vector of column names of .data by which to order. If present, override .... Defaults to NULL.
set_arrange
.data
...
NULL
For set_arrange only. An integer vector with only possible values of 1 and -1, corresponding to ascending and descending order. Defaults to 1.
Once arranged, the order of entries would be changed forever.
arrange, setorder
setorder
a = as.data.table(iris) a %>% arrange(Sepal.Length) a a %>% arrange(cols = c("Sepal.Width","Petal.Length")) a
Run the code above in your browser using DataLab