setvar.Rd
This function selects a variable by its capability name and sets the requested values at the requested dates. The units must also be supplied as a single string (heterogeneous units are not supported). These are checked against the expected unit in the code, and an error is signaled if they don't match (i.e., there is no attempt to convert units).
setvar(core, dates, var, values, unit)
Hector core object
Vector of dates
Capability string for the variable to set
Values to set. Must be either a single value or a vector the same length as dates.
Unit string. Can be set to NA for unitless variables.