getRateList.GeneralSubstitution: Get a list of events and their unscaled rates from a...

Description Usage Arguments Value Author(s) See Also Examples

Description

Get a list of events and their unscaled rates from a GeneralSubstitution object.

This method returns the list of event rates from the unscaled Q matrix (as returbed bvy the getEventRate method). The returned list contains the rates associated with the corresponding event names.

Usage

1
2
## S3 method for class 'GeneralSubstitution'
getRateList(this, ...)

Arguments

this

A GeneralSubstitution object.

...

Not used.

Value

A list of event rates.

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see GeneralSubstitution.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
	# 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 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)
 

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