prt: Print tree in table format

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/BioGeoBEARS_readwrite_v1.R

Description

Learning and using APE's tree structure can be difficult and confusing because much of the information is implicit. This function prints the entire tree to a table, and makes much of the implicit information explicit. It is not particularly fast, but it is useful.

Usage

1
2
3
  prt(t, printflag = TRUE, relabel_nodes = FALSE,
    time_bp_digits = 7, add_root_edge = TRUE,
    get_tipnames = FALSE, fossils_older_than = 0.6)

Arguments

t

A phylo tree object.

printflag

Should the table be printed to screen? Default TRUE.

relabel_nodes

Manually renumber the internal nodes, if desired. Default FALSE.

time_bp_digits

The number of digits to print in the time_bp (time before present) column. Default=7.

add_root_edge

Should a root edge be added? Default TRUE.

get_tipnames

Should the list of tipnames descending from each node be printed as a string in another column? This is slow-ish, but useful for matching up nodes between differing trees. Default FALSE.

fossils_older_than

Tips that are older than fossils_older_than will be marked as TRUE in a column called fossil. This is not currently set to 0, because Newick files can have slight precision issues etc. that mean not all tips quite come to zero. You can attempt to fix this with average_tr_tips (but make sure you do not inappropriately average in fossils!!).

Details

See http://ape.mpl.ird.fr/ape_development.html for the official documentation of R tree objects.

Value

dtf A data.frame holding the table. (Similar to the printout of a phylo4 object.)

Note

Go BEARS!

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

References

http://ape.mpl.ird.fr/ape_development.html

Matzke_2012_IBS

See Also

phylo, average_tr_tips

Examples

1
test=1

Example output

Loading required package: rexpokit
Loading required package: SparseM

Attaching package: 'SparseM'

The following object is masked from 'package:base':

    backsolve

Loading required package: Rcpp
Loading required package: cladoRcpp
Loading required package: ape
Loading required package: phylobase

Attaching package: 'phylobase'

The following object is masked from 'package:ape':

    edges

BioGeoBEARS documentation built on May 29, 2017, 8:36 p.m.