Learn R Programming

phylosim (version 3.0.5)

as.character.Event: Get the character representation of an Event object

Description

Get the character representation of an Event object.

The character represenation of an Event object has the following format: "event name" ("event rate") <-- "generator process id", like "A->T (0.333333333333333) <-- JC69:Anonymous:44780832".

Usage

# S3 method for Event
as.character(x, ...)

Arguments

x

An Event object.

...

Not used.

Value

A character 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<-s$sites[[1]]$events[[1]]
	# get the character representation of e
	as.character(e)
	# or more simply
	e
 
# }

Run the code above in your browser using DataLab