Order rows of a SedonaDB data frame using column values

sd_arrange(.data, ...)

Arguments

.data

A sedonadb_dataframe or an object that can be coerced to one.

...

Unnamed expressions for arrange expressions. These are evaluated in the same way as dplyr::arrange() except does not support extra dplyr features such as across(), .by_group, or .locale.

Value

An object of class sedonadb_dataframe

Examples

data.frame(x = c(10:1, NA)) |> sd_arrange(x)
#> <sedonab_dataframe: ?? x 1>
#> ┌───────┐
#> │   x   │
#> │ int32 │
#> ╞═══════╡
#> │     1 │
#> ├╌╌╌╌╌╌╌┤
#> │     2 │
#> ├╌╌╌╌╌╌╌┤
#> │     3 │
#> ├╌╌╌╌╌╌╌┤
#> │     4 │
#> ├╌╌╌╌╌╌╌┤
#> │     5 │
#> ├╌╌╌╌╌╌╌┤
#> │     6 │
#> └───────┘
#> Preview of up to 6 row(s)
data.frame(x = c(1:10, NA)) |> sd_arrange(desc(x))
#> <sedonab_dataframe: ?? x 1>
#> ┌───────┐
#> │   x   │
#> │ int32 │
#> ╞═══════╡
#> │    10 │
#> ├╌╌╌╌╌╌╌┤
#> │     9 │
#> ├╌╌╌╌╌╌╌┤
#> │     8 │
#> ├╌╌╌╌╌╌╌┤
#> │     7 │
#> ├╌╌╌╌╌╌╌┤
#> │     6 │
#> ├╌╌╌╌╌╌╌┤
#> │     5 │
#> └───────┘
#> Preview of up to 6 row(s)