Learn R Programming

phylosim (version 3.0.5)

getState.Site: Get the current state of a Site object

Description

Get the current state of a Site object.

Usage

# S3 method for Site
getState(this, ...)

Arguments

this

A Site object.

...

Not used.

Value

A character vector of length one contaning the state (a symbol belonging to the attached Alphabet object).

See Also

For more information see Site.

Examples

Run this code
# NOT RUN {
	# create a Site object with an Alphabet object attached
	s<-Site(alphabet=Alphabet(symbols=c(0,1)), state=1);
	# get current state
	getState(s)
	# get state via virtual field
	s$state

 
# }

Run the code above in your browser using DataLab