descend_rows: Arranging rows by selected variables

View source: R/descend_rows.R

descend_rowsR Documentation

Arranging rows by selected variables

Description

Arranging rows of data in the data.table by selected variables in descending order. This is similar to the arrange() function in the dplyr package.

Usage

descend_rows(dt, ...)

Arguments

dt

input data.table

...

column names or a vector of characters of column names in the data.table to be used for ordering the raws of data

Examples

## Not run: 
# in descending order by values in weight and mpg
dt |> descend_rows(wt, mpg)
# group using cyl and order by wt and mpg
dt |> set_group(cyl) |> descend_rows(wt, mpg)

## End(Not run)

kleu046/wr.data.table documentation built on April 25, 2022, 1:41 p.m.