Skip to contents

Takes a dataframe of edges and returns all the from and to nodes and their nodetype, and attach a column indicating their position along the causal sequence

Usage

make_nodes(edgedf, groupers = NULL, typeorder = "werp")

Arguments

edgedf

a tibble or dataframe of edges with from and to columns, as well as fromtype and totype

groupers

a character vector of grouping variables that might appear in edgedf. Typically used to retain separate nodes for different planning units or gauges

typeorder

character vector or dataframe giving the order of the node types in the network, or werp (the default). werp flags the use of the default ranking

Value

a tibble with columns for Name of each individual node, NodeType for the group of nodes of a given type, and noderoder specifying where that nodetype is in the causal flow. May also include grouping column(s)