simulate_char_unit | R Documentation |
Simulates continuous characters along a unit tree according to a Brownian motion process with rate 1.
simulate_char_unit(unit.tree, nsim = 1000)
unit.tree |
a 'unit.tree' object |
nsim |
the number of datasets to simulate (if single unit.tree is provided; see below) |
If a single unit.tree is supplied, the function will simulate nsim
datasets under a Brownian motion
process with a rate of 1. If a list of unit.trees supplied (such as those derived from a Bayesian analysis)
sim.char.unit
will simulate a single data set on each tree in the list and the nsim
argument will
be ignored.
A list of unit.trees. In each unit.tree, the phylogeny will be the same as that of the input unit.tree(s) but the data and the contrasts will be replaced by the simulated datasets.
data(finch) phy <- finch$phy dat <- finch$data[,"wingL"] ## build unit.tree object unit.tree <- make_unit_tree(phy, data=dat) ## simulate 2 datasets on unit tree sims <- simulate_char_unit(unit.tree, nsim=2) sims
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.