Dear R community, 



I would like to simulate discrete characters on a randomly generated tree. 
However, I would like to create different sets of trees and associated 
characters at certain levels of phylogenetic signal. 


Can someone point me in the right direction? 


I am familiar with sim.char from geiger package for simulating characters, and 
rcoal for simulating the ultrametric trees that I want, but I don't know how I 
could, if at all, simulate characters that have a particular a priori set 
phylogenetic signal. 


As a simple example, the following example gets phylogenetic signal (K) that is 
all over the map in different runs:


q <- list(rbind(c(-.5, .5), c(.5, -.5)))
traits <- sim.char(tree, q, model = "discrete", n = 1)
traits_ <- as.data.frame(traits[,,1])
traitsvec <- traits_[,1]
names(traitsvec) <- rownames(traits_)
phylosignal(traitsvec, tree, reps = 100)







Sincerely, 


Scott Chamberlain
Rice University, EEB Dept.



        [[alternative HTML version deleted]]

_______________________________________________
R-sig-phylo mailing list
R-sig-phylo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-phylo

Reply via email to