| tidyverse_functions | R Documentation |
Several useful functions from tidyverse packages are generic, meaning
that we can define class-specific versions of those functions and implement
them in galah; examples include filter(), select() and group_by().
However, there are also functions that are only defined within tidyverse
packages and are not generic. In a few cases we have re-implemented these
functions in galah. This has the consequence of supporting consistent
syntax with tidyverse, at the cost of potentially introducing conflicts.
This can be avoided by using the :: operator where required (see examples).
desc(...)
unnest(.query)
... |
column to order by |
.query |
An object of class |
The following functions are included:
desc() (dplyr): Use within arrange() to specify arrangement should be descending
unnest() (tidyr): Use to 'drill down' into nested information on fields, lists, profiles, or taxa
These galah versions all use lazy evaluation.
galah::desc() returns a tibble used by arrange.data_request() to arrange rows of a query.
galah::unnest() returns an object of class metadata_request.
arrange(), galah_call()
## Not run:
# Arrange grouped record counts by descending year
galah_call() |>
identify("perameles") |>
filter(year > 2019) |>
count() |>
arrange(galah::desc(year)) |>
collect()
# Return values of field `basisOfRecord`
request_metadata() |>
galah::unnest() |>
filter(field == basisOfRecord) |>
collect()
# Using `galah::unnest()` in this way is equivalent to:
show_all(fields, "basisOfRecord") |>
show_values()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.