Learn R Programming

phylosim (version 3.0.5)

setSite.Event: Assotiate an Event object with a Site object

Description

Assotiate an Event object with a Site object.

Usage

# S3 method for Event
setSite(this, new.site, ...)

Arguments

this

An Event object.

new.site

A valid Site object.

...

Not used.

Value

The new associated Site object (invisible).

See Also

For more information see Event.

Examples

Run this code
# NOT RUN {
	# create an Event object
	e<-Event()
	# create some Site objects
	s1<-Site(alphabet=NucleotideAlphabet(),state="A")
	s2<-clone(s1); s2$state<-"T"
	# assotiate s1 with e
	setSite(e,s1)
	e$site
	# assotiate s2 with e via virtual field
	e$site<-s2
	e$site
 
# }

Run the code above in your browser using DataLab