Setting the rates for a ToleranceSubstitution object.
This method set the rates in the unscaled Q matrix based on the provided list containing even names and the associated rates. The rate must be specified for every event!
# S3 method for ToleranceSubstitution
setRateList(this, value, ...)
A ToleranceSubstitution object.
A list with the events names and the associated rates.
Not used.
The ToleranceSubstitution object (invisible).
For more information see ToleranceSubstitution
.
# NOT RUN {
# create a ToleranceSubstitution object
# provide an Alphabet object and the rates
p<-ToleranceSubstitution(alphabet=BinaryAlphabet(), rate.list=list("1->0"=1,"0->1"=3))
# get the event rates from the unscaled Q matrix
getRateList(p)
# get rates from the unscaled rate matrix via virtual field
p$rateList
# set rates in the unscaled rate matrix
setRateList(p, list("0->1"=1,"1->0"=1))
p$rateList
# set rates in the unscaled rate matrix via virtual field
p$rateList<-list("0->1"=3,"1->0"=1);
# check the contenst of the associated QMatrix object
summary(p$QMatrix)
# }
Run the code above in your browser using DataLab