Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

cutPhylo

Cut the phylogeny at a given age or node


Description

The function cuts all the branches of the phylogeny which are younger than a specific age or node (i.e. the age of the node).

Usage

cutPhylo(tree,age=NULL,node=NULL,keep.lineage=TRUE)

Arguments

tree

a phylogenetic tree. The tree needs not to be ultrametric and fully dichotomous.

age

the age (in terms of time distance from the recent) at which the tree must be cut

node

the node whose age must be used as cutting limit.

keep.lineage

logical specifying whether lineages with no descendant tip must be retained (see example below). Default is TRUE.

Details

When an entire lineage is cut (i.e. one or more nodes along a path) and keep.lineages = TRUE, the leaves left are labeled as "l" followed by a number.

Value

The function returns the cut phylogeny and plots it into the graphic device. The time axis keeps the root age of the original tree.

Author(s)

Pasquale Raia, Silvia Castiglione, Carmela Serio, Alessandro Mondanaro, Marina Melchionna, Mirko Di Febbraro, Antonio Profico, Francesco Carotenuto

See Also

Examples

## Not run: 
library(ape)

set.seed(22)
rtree(100)->tree
3->age

cutPhylo(tree,age=age)->t1
cutPhylo(tree,age=age,keep.lineage=FALSE)->t1
cutPhylo(tree,node=151)->t2
cutPhylo(tree,node=151,keep.lineage=FALSE)->t2

## End(Not run)

RRphylo

Phylogenetic Ridge Regression Methods for Comparative Studies

v2.5.0
GPL-2
Authors
Pasquale Raia, Silvia Castiglione, Carmela Serio, Alessandro Mondanaro, Marina Melchionna, Mirko Di Febbraro, Antonio Profico, Francesco Carotenuto
Initial release
2020-12-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.