View source: R/sim.divergence.geo.R
sim.divergence.geo | R Documentation |
Simulates the evolution of a continuous character under a model of evolution where trait values are repelled according to between-species similarity in trait values, taking into account biogeography using a biogeo.object formatted from RPANDA (see CreateGeoObject function in RPANDA package)
sim.divergence.geo(phylo,pars, Nsegments=2500, plot=FALSE, geo.object)
phylo |
a phylogenetic tree |
pars |
A matrix with a number of rows corresponding to the desired number of simulations, columns containing values for |
Nsegments |
the minimum number of time steps to simulate |
plot |
logical indicating whether to plot the simulated trait values at each time step |
geo.object |
geography object created using CreateGeoObject |
Adjusting Nsegments
will impact the length of time the simulations take.
The length of each segment (max(nodeHeights(phylo))/Nsegments
)
should be much smaller than the smallest branch (min(phylo$edge.length)
).
A matrix with the simulated values for each lineage (one simulation per row; columns correspond to species)
J.P. Drury jonathan.p.drury@gmail.com F. Hartig
Drury, J., Grether, G., Garland Jr., T., and Morlon, H. 2017. A review of phylogenetic methods for assessing the influence of interspecific interactions on phenotypic evolution. Systematic Biology
CreateGeoObject
data(Anolis.data)
phylo<-Anolis.data$phylo
geo.object<-Anolis.data$geography.object
#simulate with the OU process present and absent
pars<-expand.grid(0.05,2,1,0,c(2,0),0)
sim.divergence.geo(phylo,pars,Nsegments=2500, plot=FALSE, geo.object)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.