Learn R Programming

phylosim (version 3.0.5)

attachProcess.Site: Attach a Process object to a Site object

Description

Attach a Process object to a Site object.

The Alphabet objects associated with the Site and Process objects must have the same symbol set, or at least one of them should inherit from the class AnyAlphabet.

During the attachment, the site-process specific parameter templates are copied from the Process object and stored in the Site object. The Process objects are marked as write protected if the attachment was succesful.

Usage

# S3 method for Site
attachProcess(this, process, ...)

Arguments

this

A Site object.

process

A Process object.

...

Not used.

Value

The Site object (invisible).

See Also

Site Process detachProcess setProcesses getProcesses isAttached

Examples

Run this code
# NOT RUN {
	# create a Site object and the associated NucleotideAlphabet object
	s<-Site(alphabet=NucleotideAlphabet())
	# create a K80 substitution process
	p<-K80()
	# attach p to s
	attachProcess(s,p)
	# get the list of attached processes
	s$processes
	# check write protection for p
	p$writeProtected
 
# }

Run the code above in your browser using DataLab