Learn R Programming

BioGeoBEARS (version 0.2.1)

section_the_tree: Section a tree for stratified analysis

Description

A utility function for stratified analysis. Sections the tree into a series of strata. Each stratum may have one or more subtrees (APE phylo3 objects, *WITH* root edges) and/or branch segments (which are just represented as numeric values, indicating the length of the sub-branch, i.e. the time-width of the stratum, if the branch crosses the whole stratum.

Usage

section_the_tree(inputs, make_master_table = FALSE, plot_pieces = TRUE, cut_fossils = TRUE, fossils_older_than = 0.6)

Arguments

inputs
The list of inputs for stratified analysis
make_master_table
If desired, make an inputs$master_table containing the correspondance between the original tree and the sectioned pieces.
plot_pieces
If TRUE, plot the tree chunks (but not isolated branch segments) as they are created.
cut_fossils
If TRUE (default), the program is stopped if there are fossils, i.e. tips older than 0.6 my (default). Users should use codedrop.tip or an external program to clip fossils out of the tree. PLEASE NOTE that several times I have experienced miserable long nights due, apparently, to drop.tip producing weird tree structures, resulting in weird Newick files, without me realizing it. The solution is usually to open the Newick file in something like FigTree, resort the branches, and save to a new Newick file. Fossils have now been implemented in stratified analysis; this was complicated, as it involves inserting new branches in chopped trees.
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 extend_tips_to_ultrametricize (but make sure you do not inappropriately average in fossils!!).

Value

inputs with inputs$tree_sections_list added.

References

http://phylo.wikidot.com/matzke-2013-international-biogeography-society-poster

Matzke_2012_IBS

See Also

prt, chainsaw2, drop.tip

Examples

Run this code
test=1

Run the code above in your browser using DataLab