X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=man%2FrTraitDisc.Rd;h=a800c465b032b7457f4344cb1055c07210d0b6be;hb=5090ae602c33e1cd3bbdbd2429a43daa8188b8c3;hp=b6b619c0394704c074cfcaca6d0d8a13d464da00;hpb=bfaeca35ec130110327a3bb7a1f0fe3b66076a95;p=ape.git diff --git a/man/rTraitDisc.Rd b/man/rTraitDisc.Rd index b6b619c..a800c46 100644 --- a/man/rTraitDisc.Rd +++ b/man/rTraitDisc.Rd @@ -65,15 +65,24 @@ rTraitDisc(phy, model = "ER", k = if (is.matrix(model)) ncol(model) else 2, } \author{Emmanuel Paradis} \seealso{ - \code{\link{rTraitCont}}, \code{\link{ace}} + \code{\link{rTraitCont}}, \code{\link{rTraitMult}}, \code{\link{ace}} } \examples{ data(bird.orders) ### the two followings are the same: rTraitDisc(bird.orders) rTraitDisc(bird.orders, model = matrix(c(0, 0.1, 0.1, 0), 2)) + ### two-state model with irreversibility: rTraitDisc(bird.orders, model = matrix(c(0, 0, 0.1, 0), 2)) + +### simple two-state model: +tr <- rcoal(n <- 40, br = runif) +x <- rTraitDisc(tr, ancestor = TRUE) +plot(tr, show.tip.label = FALSE) +nodelabels(pch = 19, col = x[-(1:n)]) +tiplabels(pch = 19, col = x[1:n]) + ### an imaginary model with stasis 0.5 time unit after a node, then ### random evolution: foo <- function(x, l) {