Learn R Programming

phytools (version 0.1-9)

pbtree: Simulate pure-birth stochastic tree or trees

Description

This function simulates stochastic pure-birth (Yule) trees.

Usage

pbtree(b=1,n=NULL,t=NULL,scale=NULL,nsim=1)

Arguments

b
birth rate or speciation rate.
n
desired number of species.
t
time stopping criterion (not yet implemented).
scale
if set, rescales tree to have total length scale.
nsim
number of simulated trees to return.

Value

  • a tree or list of trees.

Examples

Run this code
# simulate a pure-birth tree with 1000 tips, scaled to a length of 1.0
   tree<-pbtree(n=1000,scale=1)

Run the code above in your browser using DataLab