Learn R Programming

phylosim (version 3.0.5)

getBigRate.Sequence: Get the sum of all active event rates from a Sequence object

Description

Get the sum of all active event rates from a Sequence object. The sum of active event rates depends on all Site object states and on the attached Process objects. It basically returns the last element of the cumulative site rates vector.

Usage

# S3 method for Sequence
getBigRate(this, ...)

Arguments

this

A Sequence object.

...

Not used.

Value

A numeric vector of length one.

See Also

For more information see Sequence.

Examples

Run this code
# NOT RUN {
	# create a nucleotide sequence attach a process
	s<-NucleotideSequence(length=5);
	s$processes<-list(list(JC69()))
	# get the sum of active event rates
	getBigRate(s)	# returns NA because site states are undefined
	# set site states
	s$states<-c("A","T")
	# get big rate via virtual field
	s$bigRate
 
# }

Run the code above in your browser using DataLab