Finds the requested release of AusTraits on Zenodo and loads it with
traits.use::load_database(), which downloads the relational database
.rds to path (if it is not already there, or if the copy there does
not match the release's md5 checksum) and loads it.
Usage
load_austraits(
doi = NULL,
version = NULL,
path = "data/austraits",
update = TRUE,
means = FALSE
)Arguments
- doi
character string - doi of particular version
- version
character string - version number of database, e.g. "7.0.0"
- path
file path to where AusTraits will be downloaded
- update
if
TRUE, the list of AusTraits releases (seeget_versions()) and the release's metadata are downloaded afresh; if that fails (e.g. offline), the copies saved inpathare used. WithFALSE, the saved copies are used without contacting Zenodo, so a release loaded before loads offline.- means
if
TRUE, load the release's observed means rather than the database;traits.use::trait_means_dictionary()defines their columns. A release from before the means were published gives an error saying so.
Value
a large list containing AusTraits data tables, of class
traits.build. Its sources have the class traits_build_sources (see
?traits.use::traits_build_sources), also for releases built before that
class existed, so a reference can be looked up by key with $ as well as
[[ and [, e.g. austraits$sources$Falster_2005. With means = TRUE,
a tibble of the observed means.
Details
With means = TRUE it loads the release's observed means instead: one row
per taxon and trait, computed from the release's records with
traits.use::summarise_trait_means() and published with it as
austraits-<version>-observed-means.rds and .csv.gz (releases after
7.0.0; the .rds, exact, is read when present). They
are a smaller download than the database. To have both, load each.
See also
get_versions(), get_version_latest(),
traits.use::load_database(), which loads any traits.build database from
its doi