Learn R Programming

phylosim (version 3.0.5)

getPosition.Event: Get the position of the Site object associated to an Event object in the enclosing Sequence object

Description

Get the position of the Site object associated to an Event object in the enclosing Sequence object.

Usage

# S3 method for Event
getPosition(this, ...)

Arguments

this

An Event object.

...

Not used.

Value

A numeric vector of length one.

See Also

For more information see Event.

Examples

Run this code
# NOT RUN {
	# create a sequence and attach a process
	s<-NucleotideSequence(string="ATGC",processes=list(list(JC69())))
	# get the first active event from the first site
	e<-getEvents(s,1)[[1]]
	# get the position of the site associated with e
	getPosition(e)
	# get position via virtual field
	e$position
 
# }

Run the code above in your browser using DataLab