Import a stock-and-flow model from Insight Maker. Models may be your own or another user's. Importing causal loop diagrams or agent-based models is not supported.
Usage
import_insightmaker(
url,
file,
keep_nonnegative_flow = TRUE,
keep_nonnegative_stock = FALSE
)Arguments
- url
URL to Insight Maker model. Character.
- file
File path to Insight Maker model. Only used if url is not specified. Needs to be a character with suffix .InsightMaker or .json.
- keep_nonnegative_flow
If TRUE, keeps original non-negativity setting of flows. Defaults to TRUE.
- keep_nonnegative_stock
If TRUE, keeps original non-negativity setting of stocks. Defaults to FALSE.
Value
A stock-and-flow model object of class stockflow.
Details
Insight Maker models can be imported using a URL, Insight Maker file, or ModelJSON file. Ensure the URL refers to a public (not private) model. To download a model file from Insight Maker, first clone the model if it is not your own. Then, go to "Share" (top right), "Export", and "Download Insight Maker file" or "ModelJSON File".