Learn R Programming

phylosim (version 3.0.5)

getEvents.Sequence: Get the list of active Event objects for a set of Site objects aggregated by a Sequence object

Description

Get the list of active Event objects for a set of Site objects aggregated by a Sequence object.

Usage

# S3 method for Sequence
getEvents(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 list of Event objects.

See Also

For more information see Sequence.

Examples

Run this code
# NOT RUN {
	# create a sequence with a process attached
	s<-Sequence(
               string="ATGC",
               alphabets=list(NucleotideAlphabet()),
               processes=list(list(JC69()))
               )
	# get the active events from range 1:3
	getEvents(s,1:3)
	# get all active events via virtual field
	s$events
 
# }

Run the code above in your browser using DataLab