Learn R Programming

rotl (version 3.0.0)

get_study_subtree: Study Subtree

Description

Retrieve subtree from a specific tree in the Open Tree of Life data store

Usage

get_study_subtree(study_id, tree_id, subtree_id, object_format = c("phylo"), file_format, file, ...)

Arguments

study_id
the study identifier (character)
tree_id
the tree identifier (character)
subtree_id,
either a node id that specifies a subtree or “ingroup” which returns the ingroup for this subtree.
object_format
the class of the object returned by the function (default, and currently only possibility phylo from the ape package)
file_format
character, the file format to use to save the results of the query (possible values, ‘newick’, ‘nexus’, ‘json’).
file
character, the path and file name where the output should be written.
...
additional arguments to customize the API request (see rotl package documentation).

Examples

Run this code
## Not run: 
# small_tr <- get_study_subtree(study_id="pg_1144", tree="tree2324", subtree_id="node552052")
# ingroup  <- get_study_subtree(study_id="pg_1144", tree="tree2324", subtree_id="ingroup")
# nexus_file <- tempfile(fileext=".nex")
# get_study_subtree(study_id="pg_1144", tree="tree2324", subtree_id="ingroup", file=nexus_file,
#                   file_format="nexus")
# ## End(Not run)

Run the code above in your browser using DataLab