Saturday, June 15, 2013

WOOT--figured out how to date a random sample of my posterior of trees. Super straightforward:

#read in tree file to make multiphylo R object--ignoroing the first 25% as burn-in
tree.list<-read.tree(file.choose(),keep.multi=TRUE, skip = 3374)
#take random sample of trees
sample.list<-sample(tree.list,500)

#date the trees using lapply() and parameters established from Moyle, et al (2012)
newmulti<-lapply(unclass(sample.list),chronopl,lambda=0.5,age.min=c(8.4, 13, 27.1), age.max=c(11.4,17, 37.3), node = c(336, 297, 293))
#rename the object's class
class(newmulti)<-"multiPhylo"

As per Revell's comment on this post: http://comments.gmane.org/gmane.comp.lang.r.phylo/2773

No comments:

Post a Comment