Remove variable(s) from a stock-and-flow model. All references in flow connections and graphical function sources are also removed. A warning will be thrown if any lingering references to the removed name remain in the model.
Name(s) to remove. Accepts bare symbols (e.g., x), strings, or vectors via c(). Must be variable names.
remove_references
Where to remove references to the discarded variables. By default, references to discarded variables in "to", "from", "source", and "unit_test" are removed. Set to NULL to keep all references (not recommended). Note that any lingering references in equations will cause errors in simulation and should be removed or updated with update() after discarding the variable.