setRateList.QMatrix: Setting the unscaled rates stored in a QMatrix object

Description Usage Arguments Value Author(s) See Also Examples

Description

Setting the unscaled rates stored in a QMatrix 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!

Usage

1
2
## S3 method for class 'QMatrix'
setRateList(this, value, ...)

Arguments

this

A QMatrix object.

value

A list with the events names and the associated rates.

...

Not used.

Value

The QMatrix object (invisible).

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see QMatrix.

Examples

 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
 

phylosim documentation built on Nov. 22, 2019, 1:07 a.m.