ascend_rows | R Documentation |
Arranging rows of data in the data.table by selected variables in ascending order. This is similar to the arrange() function in the dplyr package.
ascend_rows(dt, ...)
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 |
## Not run: # in descending order by values in weight and mpg dt <- data1 |> data.table() dt |> ascend_rows(wt, mpg) # group using cyl and order by wt and mpg dt |> set_group(cyl) |> ascend_rows(wt, mpg) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.