Last chance! 50% off unlimited learning
Sale ends in
cladogeneticTraitCont(taxa, rate = 1, meanChange = 0, rootTrait = 0)
simFossilTaxa
,
This function is similar to Brownian motion simulation functions such as
rTraitCont
in ape, sim.char
in geiger and fastBM
in
phytools.
See also unitLengthTree
in this package and
speciationalTree
in the package geiger. These are tree transformation
functions; together with BM simulation functions, they would be expected to
have a similar effect as this function (when cladogenesis is 'bifurcating'
and not 'budding'; see above).set.seed(444)
taxa <- simFossilTaxa(p=0.1,q=0.1,nruns=1,mintaxa=30,maxtime=1000,plot=TRUE)
trait <- cladogeneticTraitCont(taxa)
tree <- taxa2phylo(taxa)
plotTraitgram(trait,tree,conf.int=FALSE)
#with cryptic speciation
taxa <- simFossilTaxa(p=0.1,q=0.1,prop.cryptic=0.5,nruns=1,mintaxa=30,maxtime=1000,
plot=TRUE)
trait <- cladogeneticTraitCont(taxa)
tree <- taxa2phylo(taxa)
plotTraitgram(trait,tree,conf.int=FALSE)
Run the code above in your browser using DataLab