Learn R Programming

phylosim (version 3.0.5)

setProcesses.Sequence: Specify a set of Process objects to be attached to a set of Site objects aggregated by a Sequence object

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

# S3 method for 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).

See Also

For more information see Sequence.

Examples

Run this code
# NOT RUN {
	# 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
 
# }

Run the code above in your browser using DataLab