The current syntax for getting 'values' from a given system is to use e.g.
search_all(profiles, "ALA") |>
show_values()
or equivalently:
request_metadata() |>
filter(profile == "ALA") |>
unnest() |>
collect()
This works for fields, lists and profiles at present. It is intended to work for taxa as well, to show child taxa, but doesn't work because of a minor bug (it uses taxon names instead of IDs).
A better way would be for show_values() / unnest() to call the recursive code currently in atlas_taxonomy(), and deprecate the latter. While atlas_taxonomy() has been around a long time, it hasn't been well-supported and is poorly integrated with the rest of the package. It is also conceptually distinct from the other atlas_ functions as being the only one that isn't based on occurrence records. Placing it as a sub-function under search_taxa() would be tidier and more consistent with other metadata-related functions.
By default this would only call one set of child taxa; but perhaps we could add a lowest_rank argument or similar that would support recursion.
The current syntax for getting 'values' from a given system is to use e.g.
or equivalently:
This works for
fields,listsandprofilesat present. It is intended to work fortaxaas well, to show child taxa, but doesn't work because of a minor bug (it uses taxon names instead of IDs).A better way would be for
show_values()/unnest()to call the recursive code currently inatlas_taxonomy(), and deprecate the latter. Whileatlas_taxonomy()has been around a long time, it hasn't been well-supported and is poorly integrated with the rest of the package. It is also conceptually distinct from the otheratlas_functions as being the only one that isn't based on occurrence records. Placing it as a sub-function undersearch_taxa()would be tidier and more consistent with other metadata-related functions.By default this would only call one set of child taxa; but perhaps we could add a
lowest_rankargument or similar that would support recursion.