X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=man%2FrTraitDisc.Rd;h=a800c465b032b7457f4344cb1055c07210d0b6be;hb=2014b83971be4b9cd1644d6127837df798e9335c;hp=e2c43d9d7b4264f0f54822f065f5e4c829634be5;hpb=4ef7ac2c31da7b7c70a31f1f95a1182d22c3a71a;p=ape.git diff --git a/man/rTraitDisc.Rd b/man/rTraitDisc.Rd index e2c43d9..a800c46 100644 --- a/man/rTraitDisc.Rd +++ b/man/rTraitDisc.Rd @@ -72,8 +72,17 @@ 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) {