sizedsubtree: Find a node subtending to a clade of desired size

View source: R/sizedsubtree.R

sizedsubtreeR Documentation

Find a node subtending to a clade of desired size

Description

The function sizedsubtree scans a phylogentic tree to randomly find nodes subtending to a subtree of desired minimum size, up to one half of the tree size (number of tips).

Usage

sizedsubtree(tree,Size=NULL,time.limit=10)

Arguments

tree

a phylogenetic tree.

Size

the desired size of the tree subtending to the extracted node. By default, the minimum tree size is set at one tenth of the tree size (i.e. number of tips).

time.limit

specifies a limit to the searching time, a warning message is thrown if the limit is reached.

Details

The argument time.limit sets the searching time. The algorithm stops if that limit is reached, avoiding recursive search when no solution is in fact possible.

Value

A node subtending to a subtree of desired minimum size.

Author(s)

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

Examples

data("DataOrnithodirans")
DataOrnithodirans$treedino->treedino

sizedsubtree(tree=treedino,Size=40)

RRphylo documentation built on June 7, 2023, 5:49 p.m.