mutate {genealogy} | R Documentation |
A function to mutate trees. Mutations can either be infinite sites or STRs (simple tandem repeats).
mutate1(tr, nSTR = 5, theta = 1, ninf = 0)
tr |
An object of class tree |
nSTR |
The numebr of STRs |
theta |
The scaled STR mutation rate. |
ninf |
The number of infinite sites |
Returns an object of class STRtree
, inftree
or
STRinftree
depending on the parameters passed to the function. This is a list of
class tree
with the additional list components
STR |
A matrix with nSTR columns |
inf |
A matrix with ninf columns |
Ian Wilson <I.Wilson@maths.abdn.ac.uk>
tr <- coal1(10) plot(mutate(tr,nSTR=5)) plot(mutate(tr,ninf=5))