Description Usage Arguments Value Author(s) See Also Examples
Get a list of events and their unscaled rates from a QMatrix object.
This method returns the list of event rates from the unscaled rate matrix. The returned list contains the rates associated with the corresponding event names.
1 2 | ## S3 method for class 'QMatrix'
getRateList(this, ...)
|
this |
A GeneralSubstitution object. |
... |
Not used. |
A list of event rates.
Botond Sipos, Gregory Jordan
For more information see QMatrix
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # create a GeneralSubstitution object
# provide an Alphabet object and the rates
p<-GeneralSubstitution(alphabet=BinaryAlphabet(), rate.list=list("1->0"=1,"0->1"=3))
# get the QMatrix object from p
m<-p$QMatrix
# get the event rates from the unscaled Q matrix
getRateList(m)
# get rates from the unscaled rate matrix via virtual field
m$rateList
# set rates in the unscaled rate matrix
setRateList(m, list("0->1"=1,"1->0"=1))
m$rateList
# set rates in the unscaled rate matrix via virtual field
m$rateList<-list("0->1"=3,"1->0"=1);
m$rateList
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.