View source: R/node_edge_list.R
simplify_edge_list | R Documentation |
A PSUT energy conversion chain edge can be simplified if a product has only one supplier (i.e., one "from"). Then, every "to" node for that product can have the product's "from" be its "from". See examples.
simplify_edge_list(
edge_list,
from = "From",
to = "To",
value = "Value",
product = "Product"
)
edge_list |
the edge list to be simplified |
from |
the name of the from column in the edge list. (Default is " |
to |
the name of the to column in the edge list. (Default is " |
value |
the name of the value column in the edge list. (Default is " |
product |
the name of the product column in the edge list. (Default is " |
a simplified edge list
el <- data.frame(From = c("A", "Oil"), To = c("Oil", "C"),
Value = c(42, 42), Product = c("Oil", "Oil"),
stringsAsFactors = FALSE)
# Oil flows from A to C through its product node (Oil)
el
# Simplify to have Oil flow from A to C without the product node
simplify_edge_list(el)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.