dt2_order: Define initial ordering (option 'order')

View source: R/dt2_options.R

dt2_orderR Documentation

Define initial ordering (option order)

Description

Define initial ordering (option order)

Usage

dt2_order(options = list(), ...)

Arguments

options

Options list.

...

Vectors like c(col, "asc"/"desc"). col may be name or 1-based index.

Value

Updated options.

Examples

opts <- list(columns = names(mtcars))
opts <- dt2_order(opts, c("mpg", "desc"))
dt2(mtcars, options = opts)

DT2 documentation built on June 14, 2026, 9:06 a.m.