Learn R Programming

phylosim (version 3.0.5)

getTotalRate.Site: Get the total active event rate

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

# S3 method for Site
getTotalRate(this, ...)

Arguments

this

A Site object.

...

Not used.

Value

A numeric vector of length one.

See Also

For more information see Site.

Examples

Run this code
# NOT RUN {
	# 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

 
# }

Run the code above in your browser using DataLab