setState.Site: Set the state of a Site object

Description Usage Arguments Value Author(s) See Also Examples

Description

Set the state of a Site object.

Usage

1
2
## S3 method for class 'Site'
setState(this, new.state, ...)

Arguments

this

A Site object.

new.state

A character vector of length one, containing a symbol belonging to the attached Alphabet object.

...

Not used.

Value

Returns the new state (invisible).

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see Site.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
       # create a Site object with an Alphabet object attached
       s<-Site(alphabet=Alphabet(symbols=c(0,1)), state=1);
       # set a new state
       setState(s,"0")
       # get state via virtual field
       s$state
       # set a new state via virtual field
       s$state<-1
	s$state

 

phylosim documentation built on Nov. 22, 2019, 1:07 a.m.