powered by
This is a method for dplyr generic arrange(). It is translated to an order() call in the i argument of [.data.table.
arrange()
order()
i
[.data.table
# S3 method for dtplyr_step arrange(.data, ..., .by_group = FALSE)
A lazy_dt().
lazy_dt()
<data-masking> Variables, or functions of variables. Use desc() to sort a variable in descending order.
data-masking
desc()
If TRUE, will sort first by grouping variable. Applies to grouped data frames only.
TRUE
library(dplyr, warn.conflicts = FALSE) dt <- lazy_dt(mtcars) dt %>% arrange(vs, cyl) dt %>% arrange(desc(vs), cyl) dt %>% arrange(across(mpg:disp))
Run the code above in your browser using DataLab