EvalOutput: Evaluate ovariable output

Description Usage Arguments Details Value Author(s) Examples

View source: R/EvalOutput.r

Description

Evaluate the output slot of an ovariable, which usually means recursively evaluating any dependent variables as well.

Usage

1
EvalOutput(variable, fillna = FALSE, indent = 0, verbose = FALSE, ...)

Arguments

variable

an ovariable

fillna

if TRUE, fillna is attempted at the end

indent

internal integer argument used in verbose printing

verbose

use TRUE to enable status messages while processing outputs and various checks

...

arguments are passed on to ovariable formulas and to dependent EvalOutput calls (recursivity), number of iterations (N) is commonly set here

Details

EvalOutput automates most of the other features related to ovariable handling. It runs ComputeDependencies first, produces a data.frame by combining the return values from interpreting the data slot and running the formula slot function, makes a "Source" -column to distinguish between the two "Results" and lastly CheckMarginals is run on the variable (optionally also fillna).

Since EvalOutput is usually run on the end node of a model, there should not be inputs or decisions hence they are not checked for. In contrast ComputeDependencies runs all Checks besides CheckMarginals.

See also: http://en.opasnet.org/

Value

Returns the input ovariable with the output slot (re)defined.

Author(s)

T. Rintala teemu.rintala.a@gmail.com

Examples

1
2
3
a <- Ovariable("a", data.frame(A = c("a", "b"), Result = c("1-2", "1-4")))
a <- EvalOutput(a, N = 10)
a@output

OpasnetUtils documentation built on May 2, 2019, 12:39 p.m.