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

Description Usage Arguments Value Author(s) See Also Examples

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

1
2
## S3 method for class 'Site'
attachProcess(this, process, ...)

Arguments

this

A Site object.

process

A Process object.

...

Not used.

Value

The Site object (invisible).

Author(s)

Botond Sipos, Gregory Jordan

See Also

Site Process detachProcess setProcesses getProcesses isAttached

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
	# 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
 

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