Learn R Programming

phytools (version 0.2-40)

repPhylo: Replicate a tree into a list of trees

Description

This function is functionally equivalent to rep, except that it works for phylogenies. Will create an object of class "multiPhylo".

Usage

repPhylo(tree, times)

Arguments

tree
object of class "phylo".
times
number of times to replicate tree.

Value

  • An object of class "multiPhylo".

See Also

c.phylo, rep

Examples

Run this code
tree<-pbtree(n=100)
	trees<-repPhylo(tree,100)

Run the code above in your browser using DataLab