arrange.data_request() arranges rows of a query on the server side, meaning
that the query is constructed in such a way that information will be arranged
when the query is processed. This only has an effect when used in combination
with count() and
group_by(). The benefit of using
arrange() within a galah_call() pipe is that it is sometimes beneficial
to choose a non-default order for data to be delivered in, particularly if
slice_head() is also called.
Arguments
- .data
An object of class
data_request- ...
A variable to arrange the resulting tibble by. Should be one of the variables also listed in
group_by().
Examples
if (FALSE) { # \dontrun{
# Arrange grouped counts by ascending year
galah_call() |>
identify("Crinia") |>
filter(year >= 2020) |>
group_by(year) |>
arrange(year) |>
count() |>
collect()
# Arrange grouped counts by ascending record count
galah_call() |>
identify("Crinia") |>
filter(year >= 2020) |>
group_by(year) |>
arrange(count) |>
count() |>
collect()
# Arrange grouped counts by descending year
galah_call() |>
identify("Crinia") |>
filter(year >= 2020) |>
group_by(year) |>
arrange(desc(year)) |>
count() |>
collect()
} # }
