setProcesses.Site: Specify the list of Process objects attached to a Site object

Description Usage Arguments Value Author(s) See Also Examples

Description

Specify the list of Process objects attached to a Site object. The Process objects in the "value" list correspond to the set of processes to be attached to the Site object. Process objects already attached to a given Site are skipped. Attached processes which are not memebers of the list are detached, so specifying an empty list will detach all processes.

This method is an alternative to attachProcess.Site and detachProcess.Site, working with more than one process object.

Usage

1
2
## S3 method for class 'Site'
setProcesses(this, value, ...)

Arguments

this

A Site object.

value

A list of valid Process objects.

...

Not used.

Value

The Site object (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
12
13
14
	# create a Site object
	s<-Site(alphabet=NucleotideAlphabet())
	# create some processes
	p1<-JC69(); p2<-K80(); p3<-DiscreteInsertor(rate=1);
	# attach the processes
	setProcesses(s,list(p1,p2,p3))
	# attach one more process via virtual field
	s$processes<-c(s$processes,list(GTR()))
	# get the list of attached processes
	s$processes
	# detach all processes via virtual field
	s$processes<-list()
	s$processes
 

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