ddm_opts<- | R Documentation |
Functions to get or set the optional, user-defined R objects attached to a model object.
ddm_opts(object, ...) <- value
## S3 replacement method for class 'drift_dm'
ddm_opts(object, ..., eval_model = FALSE) <- value
ddm_opts(object, ...)
## S3 method for class 'drift_dm'
ddm_opts(object, ...)
object |
an object of type drift_dm. |
... |
additional arguments passed down to the specific method. |
value |
an arbitrary R object. |
eval_model |
logical, indicating if the model should be re-evaluated or
not after attaching the arbitrary R object to the model
(see re_evaluate_model). Default is |
When deriving model predictions, the model's component functions
(see comp_funs()
) are evaluated and the returned values are
passed forward to dedicated numerical methods implemented in dRiftDM.
To allow users to access arbitrary R objects within their custom component
functions, models may contain a ddm_opts
entry (see also
drift_dm()
and the end of
vignette("customize_ddms", "dRiftDM")
for an example).
ddm_opts()
is a generic accessor function, and ddm_opts<-()
is a
generic replacement function. The default methods get and set the optional
R object.
For ddm_opts()
the optional R object that was once supplied by the user, or
NULL
.
For ddm_opts<-()
the updated drift_dm object.
drift_dm()
, comp_funs()
# get a pre-built model for demonstration
a_model <- ratcliff_dm()
ddm_opts(a_model) <- "Hello World"
ddm_opts(a_model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.