controls {dMod} | R Documentation |
List, get and set controls for different functions
Description
Applies to objects of class objfn
,
parfn
, prdfn
and obsfn
. Allows to manipulate
different arguments that have been set when creating the
objects.
Usage
controls(x, ...)
## S3 method for class 'objfn'
controls(x, name = NULL, ...)
## S3 method for class 'fn'
controls(x, condition = NULL, name = NULL, ...)
controls(x, ...) <- value
## S3 replacement method for class 'objfn'
controls(x, name, ...) <- value
## S3 replacement method for class 'fn'
controls(x, condition = NULL, name, ...) <- value
Arguments
x |
function |
... |
arguments going to the appropriate S3 methods |
name |
character, the name of the control |
condition |
character, the condition name |
value |
the new value |
Details
If called without further arguments, controls(x)
lists the
available controls within an object. Calling controls()
with name
and condition
returns the control value. The value can be overwritten. If
a list or data.frame ist returned, elements of those can be manipulated by the
$
- or []
-operator.
Value
Either a print-out or the values of the control.
Examples
## parfn with condition
p <- P(eqnvec(x = "-a*x"), method = "implicit", condition = "C1")
controls(p)
controls(p, "C1", "keep.root")
controls(p, "C1", "keep.root") <- FALSE
## obsfn with NULL condition
g <- Y(g = eqnvec(y = "s*x"), f = NULL, states = "x", parameters = "s")
controls(g)
controls(g, NULL, "attach.input")
controls(g, NULL, "attach.input") <- FALSE
[Package dMod version 1.0.2 Index]