"ovariable"
Standard modelling variables for the Opasnet modelling framework
Objects can be created by calls of the form new("ovariable", ...)
.
Or by using the Ovariable
-constructor.
name
:Object of class "character"
name of variable, should match object name
output
:Object of class "data.frame"
output from formula and/or data operations
data
:Object of class "data.frame"
data describing the variable, should have a "Result" column
marginal
:Object of class "logical"
identifies output columns which are considered indices
formula
:Object of class "function"
a function that produces a data.frame
that describes this variable
dependencies
:Object of class "data.frame"
list of variables that are used in formula
, format is described in details for Fetch
ddata
:Object of class "character"
specifies an Opasnet page identifier (Op_enXXXX) which will be used to download most recent data on this variable in the Opasnet database
signature(x = "ovariable")
: Math
will be applied on Result column of output
signature(x = "data.frame", y = "ovariable")
: data.frame
will be converted to ovariable
(with only output slot defined) and then merged
signature(x = "numeric", y = "ovariable")
: numeric
is converted to data.frame
and then to ovariable
and then merged
signature(x = "ovariable", y = "data.frame")
: same as above
signature(x = "ovariable", y = "numeric")
: same as above
signature(x = "ovariable", y = "ovariable")
: output slots will be merged with all = TRUE, a blank ovariable with only output defined is returned
signature(e1 = "numeric", e2 = "ovariable")
: numeric
is converted to data.frame
and then to ovariable
and then operated
signature(e1 = "ovariable", e2 = "numeric")
: same as above
signature(e1 = "ovariable", e2 = "ovariable")
: the ovariable
s are merged and then the two Result columns are operated unto, the result is saved in another Result column (or the same if they are not named: "Var1Result" vs "Result")
signature(x = "ovariable")
: plots a simple comparison between sources (data vs formula)
signature(object = "ovariable")
: returns a data.frame
. Takes function_names
and marginals
as extra arguments. The former matches
character vector
elements into functions which will be tapplied
with. The latter matches character vector
elements to output
data.frame
columns which define INDEX. The default is to tapply
over iterations using mean
, sd
, min
, quantile(probs=0.025)
, median
, quantile(probs=0.975)
and max
.