setGlobalQuantities applies given values to global quantities of the model depending on the key argument.

setGlobalQuantities(
  key = NULL,
  name = NULL,
  type = NULL,
  unit = NULL,
  initial_value = NULL,
  initial_expression = NULL,
  expression = NULL,
  data = NULL,
  model = getCurrentModel()
)

Arguments

key

Identify which global quantity to edit by specifying it's key, as string. Also supports fragments of keys, if uniquely matching one global quantity.

name

Name to set, as string.

type

Type ("fixed", "assignment", "ode") to set, as string.

unit

Unit to set, as string.

initial_value

Initial value to set, as numeric.

initial_expression

Initial expression to set, as string, finite numeric, or logical.

expression

Expression to set, as string, finite numeric, or logical.

data

A data frame as given by getGlobalQuantities which will be applied before the other arguments.

model

A model object.

Details

Use the key argument to specify which global quantity to modify and any of the other arguments to specify the value to set. The function is fully vectorized. If a NA value is supplied, the model value is kept unchanged.

The online article on managing model entities provides some further context.