View source: R/CreateClassObject.R
CreateClassObject | R Documentation |
This function returns names of internode intervals, named descendants of each node,
and a class object formatted in a way that can be
passed to CreateGeobyClassObject
CreateClassObject(map,rnd=5,return.mat=FALSE)
map |
stochastic map from |
rnd |
integer indicating the number of decimal places to which times should be rounded (default value is 5) (see |
return.mat |
logical indicating whether to return simmap in a format to be passed to other internal functions (usually FALSE) |
This function formats the class object so that it can be correctly
passed to the numerical integration performed in fit_t_comp_subgroup
.
a list with the following components:
class.object |
a list of matrices specifying the state of each branch during each internode interval (see Details) |
times |
a vector containing the time since the root of the tree at which nodes or changes in biogeography occur (used internally in other functions) |
spans |
a vector specifying the distances between times (used internally in other functions) |
Jonathan Drury jonathan.p.drury@gmail.com
Drury, J., Tobias, J., Burns, K., Mason, N., Shultz, A., and Morlon, H. in review. Contrasting impacts of competition on ecological and social trait evolution in songbirds. PLOS Biology.
Drury, J., Clavel, J., Manceau, M., and Morlon, H. 2016. Estimating the effect of competition on trait evolution using maximum likelihood inference. Systematic Biology doi 10.1093/sysbio/syw020
fit_t_comp_subgroup
,CreateGeobyClassObject
data(Anolis.data)
#Create a make.simmap object
require(phytools)
geo<-c(rep("cuba",7),rep("hispaniola",9),"puerto_rico")
names(geo)<-Anolis.data$phylo$tip.label
stochastic.map<-phytools::make.simmap(Anolis.data$phylo,
geo, model="ER", nsim=1)
CreateClassObject(stochastic.map)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.