Learn R Programming

rodeo (version 0.8.2)

getVars: Query Values of State Variables

Description

Query values of state variables of a rodeo-based model.

Value

A numeric vector or array.

Arguments

asArray

Logical. If FALSE, the values of variables are returned as vector irrespective of the model's spatial resolution. If TRUE, the values are returned as an array with properly named dimensions. The array's last dimension represents the variables and its first (fastest cycling) dimension, if any, refers to the model's highest spatial dimension.

useNames

Logical. Used to enable/disable element names for the return vector when asArray is FALSE. The names follow the pattern 'x.i.j' where 'x' is the variable name and 'i', 'j' are indices of the sub-units in the first and second spatial dimension. The actual suffix is controlled by the number of dimensions and in the 0-dimensional case, no suffix is applied at all, i.e. the pure variable names are used to label the elements of the vector. If isArray is TRUE, this argument is simply ignored, hence the dimensions of a returned array are always named.

See Also

The corresponding 'set' method is setVars and examples can be found there. Use getPars to query the values of parameters rather than variables.