tol_node_info: Node info

Description Usage Arguments Details Value Examples

View source: R/tol.R

Description

Get summary information about a node in the synthetic tree

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
tol_lineage(tax, ...)

tol_node_info(ott_id = NULL, node_id = NULL, include_lineage = FALSE, ...)

## S3 method for class 'tol_node'
tax_rank(tax, ...)

## S3 method for class 'tol_node'
tax_sources(tax, ...)

## S3 method for class 'tol_node'
unique_name(tax, ...)

## S3 method for class 'tol_node'
tax_name(tax, ...)

## S3 method for class 'tol_node'
ott_id(tax, ...)

## S3 method for class 'tol_node'
source_list(tax, ...)

## S3 method for class 'tol_node'
tax_lineage(tax, ...)

## S3 method for class 'tol_node'
tol_lineage(tax, ...)

Arguments

tax

an object returned by tol_node_info.

...

additional arguments to customize the API call (see ?rotl for more information)

ott_id

Numeric. The OpenTree taxonomic identifier.

node_id

Character. The OpenTree node identifier.

include_lineage

Logical (default = FALSE). Whether to return the lineage of the node from the synthetic tree.

Details

Returns summary information about a node in the graph. The node of interest may be specified using either a node id or an taxon id, but not both. If the specified node or OTT id is not in the graph, an error will be returned.

If the argument include_lineage=TRUE is used, you can use tax_lineage() or tol_lineage to return the taxonomic information or the node information for all the ancestors to this node, down to the root of the tree.

Value

tol_node_info returns an invisible list of summary information about the queried node:

tol_lineage and tax_lineage return data frames. tol_lineage indicate for each ancestor its node identifier, the number of tips descending from that node, and whether it corresponds to a taxonomic level.

Examples

1
2
3
4
5
6
7
8
## Not run: 
birds <- tol_node_info(ott_id=81461, include_lineage=TRUE)
source_list(birds)
tax_rank(birds)
ott_id(birds)
tax_lineage(birds)
tol_lineage(birds)
## End(Not run)

rotl documentation built on Oct. 23, 2020, 8:22 p.m.