Create an updated OpenTree chronograms database object
Source:R/opentree_chronograms.R
update_datelife_cache.Rd
The function calls get_opentree_chronograms()
to update the OpenTree
chronograms database cached in datelife. It has the option to write the updated
object as an .Rdata file, that will be independent of the opentree_chronograms
data object that you can load with data("opentree_chronograms", package = "datelife")
.
Arguments
- write
Defaults to
TRUE
, it saves an .Rdata file named indicated by argumentname
, containing available chronograms from Open Tree of Life. Saves to path indicated by argumentpath
.- updated_name
Used if
write = TRUE
. Defaults to"opentree_chronograms_updated"
. A character vector of length one indicating the name to assign to both the updated OpenTree chronogram database object and the ".Rdata" file. For example, ifname = "my_database"
, the function will assign the updated chronogram database to an object namedmy_database
and will write it to a file named "my_database.Rdata" in the path indicated by argumentfile_path
.- file_path
Used if
write = TRUE
. A character vector of length 1 indicating the path to write the updated database ".Rdata" file to, excluding file name. Defaults to temporary directory obtained withbase::tempdir()
and formatted withbase::file.path()
.- ...
Arguments passed on to
get_opentree_chronograms
max_tree_count
Default to "all", it gets all available chronograms. For testing purposes, a numeric value indicating the max number of trees to be cached.
Value
A list of 4 elements:
- authors
A list of lists of author names of the original studies that published chronograms currently stored in the Open Tree of Life database.
- curators
A list of lists of curator names that uploaded chronograms to the Open Tree of Life database.
- studies
A list of study identifiers from original studies that published chronograms currently stored in the Open Tree of Life database.
- trees
A
multiPhylo
object storing the chronograms from Open Tree of Life database.- update
A character vector indicating the time when the database object was last updated.
- version
A character vector indicating the datelife package version when the object was last updated.