Description Usage Arguments Value Examples
For each substance involved, the balance per (internal) node is inspected. If outflow exceed inflow, or vice versa, a message is printed, and the function returns FALSE.
1 | check_balance(nodes, flows, tolerance = 0.01)
|
nodes |
data.frame containing the nodes definition |
flows |
data.frame containing the flows definition |
tolerance |
numeric specifying a tolerance. Default is 0.01 (1%) |
TRUE if balanced, FALSE if not.
1 2 3 | nodes <- data.frame(ID=c("A","B","C"), x=1:3, y=1:3, dir=c("right","right","stock"))
flows <- data.frame(from=c("A","B"), to=c("B","C"), quantity=c(10,10))
check_balance(nodes,flows)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.