setProcesses.Sequence: Specify a set of Process objects to be attached to a set of...

Description Usage Arguments Value Author(s) See Also Examples

Description

Specify a set of Process objects to be attached to a set of Site objects aggregated by a Sequence object. The Process objects in a given inner list correspond to the set of processes to be attached to one 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.

Usage

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

Arguments

this

A Sequence object.

value

A list of list of Process objects, recycled if shorter than the index vector.

index

An integer vector specifying a set of positions. It is set to 1:seq$length if omitted.

...

Not used.

Value

The Sequence object (invisible).

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see Sequence.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
	# create a sequence of length 5
	s<-Sequence(length=5,alphabets=list(NucleotideAlphabet()));
	# set a pattern of processes
	setProcesses(s,list(list(JC69(),K81())))
	# get attached processes
	s$processes
	# detach all processes from range 1:3
	setProcesses(s,list(list()),1:3)
	s$processes
	# detach all processes via virtual field
	s$processes<-list(list())
	# create a process pattern in the full sequence via virtual field
	s$processes<-list(list(JC69()),list(GTR(),K80()))
	s$processes
 

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