Learn R Programming

phylosim (version 3.0.5)

setParameterAtSite.Process: Set the value of a site-process specific paramter in a Site object attached to a Process object

Description

Set the value of a site-process specific paramter in a Site object attached to a Process object. The Process object must be attached to the Site object. The new value must be compatible with the type of the site-process specific parameter.

Usage

# S3 method for Process
setParameterAtSite(this, site, id, value, ...)

Arguments

this

A Process object.

site

A Site object.

id

The identifier of the site-process specific parameter.

value

The new value for the parameter.

...

Not used.

Value

The site-process specific parameter, which is a list containing the following keys: id, name, value, type.

See Also

For more information see Process.

Examples

Run this code
# NOT RUN {
	# create a Site and a Process object
	a<-BinaryAlphabet()
	s<-Site(alphabet=a)
	p<-Process(alphabet=a)
	# attach the process
	attachProcess(s,p)
	# set the value of the rate multiplier
	setParameterAtSite(p,s,"rate.multiplier",2)
	# get the value of the rate multiplier
	getParameterAtSite(p,s,"rate.multiplier")
 
# }

Run the code above in your browser using DataLab