getTotalRate.Site: Get the total active event rate

Description Usage Arguments Value Author(s) See Also Examples

Description

Get the total active event rate. The total rate is the sum of the rates of all active events given the current state of the Site object.

Usage

1
2
## S3 method for class 'Site'
getTotalRate(this, ...)

Arguments

this

A Site object.

...

Not used.

Value

A numeric vector of length one.

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see Site.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
	# create a nucleotide site with a JC69 substitution process attached
       s<-Site(state="A",alphabet=NucleotideAlphabet(),processes=list(JC69()))
       # get the total rate
	getTotalRate(s)
       # add a new process
       attachProcess(s,K80(rate.params=list("Alpha"=1,"Beta"=0.5)))
       # get the total rate via virtual field
       s$totalRate

 

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