Arrange rows of JSON data by column values.
Arguments
- .data
A
tbl_lazy_jsonobject.- ...
Columns to sort by. Wrap a column in
dplyr::desc()to sort it in descending order. Multiple columns break ties left to right. Bare column names and character strings are both accepted.- .by_group
Ignored. Accepted for consistency with the generic; grouped arrange ordering is not applied for
tbl_lazy_json.
Value
A tbl_lazy_json object with the sort appended as a lazy compute
step. The ordering is applied in the browser when the pipeline is
evaluated by compute()/collect().
Details
Sorting happens in the browser and is stable across ties, so the original row order is preserved within equal keys.
Examples
if (interactive()) {
tbl(session, "mtcars") |>
arrange(cyl, desc(mpg))
}
