Learn R Programming

phylosim (version 3.0.5)

getCumulativeRatesFromRange.Sequence: Get the cumulative site rates for a collection of Site objects aggregated by a Sequence object

Description

Get the cumulative site rates for a collection of Site objects aggregated by a Sequence object.

Usage

# S3 method for Sequence
getCumulativeRatesFromRange(this, index, ...)

Arguments

this

A Sequence object.

index

An integer vector specifying a set of positions. It is set to 1:seq$length if omitted.

...

Not used.

Value

A numeric vector.

See Also

For more information see Sequence.

Examples

Run this code
# NOT RUN {
	# create a sequence with some processes attached
	s<-Sequence(
               string="ATGC",
               alphabets=list(NucleotideAlphabet()),
               processes=list(list(JC69()),list(JC69(),GTR()))
               )
	# get cumulative rates for positions 1 and 3
	getCumulativeRatesFromRange(s,c(1,3))
	# get all cumulative rates via virtual field
	s$cumulativeRates	# via the "getCumulativeRates.Sequence" method
 
# }

Run the code above in your browser using DataLab