Class definition of 'RAVE' constrained variable collection
Source:R/class-variable-collection.R
RAVEVariableCollection.RdSee new_variable_collection for construction
Value
Formatted characters
Self
The removed variable
TRUE if found, otherwise FALSE
Self
The variable value if variable if found and
get_definition is false; or the variable definition if variable
is found and is RAVEVariable or RAVEVariableCollection;
or ifnotfound if the variable does not exist
The variable values in list
Nothing
TRUE if valid, or raises errors by default
TRUE if valid, otherwise returns the error message
A list of constraint data that can be passed into
$restore method
RAVEVariableCollection instance
Public fields
explicitwhether getting and setting values should be explicit. If true, then all variables must be defined (see
$add_variable) before used.
Active bindings
.wrapperwrapper instance of current variable collection
generatorclass definition
isRAVEVariableCollectionalways true
variablesmap containing the variable definitions
varnamesvariable names
namedescriptive name of the collection
Methods
Method add_variable()
Registers a variable, must run if the collection is explicit
Arguments
idvariable 'ID'
vara
RAVEVariableorRAVEVariableCollectioninstance if the variable is bounded, or simply normal R object ( then the variable will have no constraint)
Method set_value()
Set value of a variable
Usage
RAVEVariableCollection$set_value(id, value, env = parent.frame(), ...)Method get_value()
Get value of a variable
Usage
RAVEVariableCollection$get_value(
id,
env = parent.frame(),
get_definition = FALSE,
ifnotfound = NULL
)Method validate()
Run validation
Usage
RAVEVariableCollection$validate(
env = parent.frame(),
on_error = c("error", "warning", "message", "muffle")
)Method check()
Check if the value is valid with no error raised
Usage
RAVEVariableCollection$check(env = parent.frame())Method restore()
Restores from atomic list generated by $store()
Usage
RAVEVariableCollection$restore(x, env = parent.frame(), clear = FALSE, ...)