View source: R/make_nodelist.R
make_nodelist | R Documentation |
make_nodelist()
makes a node list from the the "to" and "from" columns of the supplied data frame. A node list is a data frame with a "node" column and, optionally, columns for node attributes, where each row is a node.
make_nodelist(data, node_attributes = NULL, from = "from", to = "to", node = "node")
data |
a data set with a "from" column and a "to" column, where each row represents a directed edge. (See the |
node_attributes |
an optional data frame with a "node" column and columns for node attributes, where each row represents a node. (See the |
from |
the name of the column in |
to |
the name of the column in |
node |
the name of the column in |
A netlit_nodelist
object, which is a data frame with a node column containing the names of all of the nodes present in data
. If node_attributes
is supplied, additional columns for node attributes will be present. The "node"
attribute contains the name of the "node" column in the returned object, which will always be the first column.
review
, augment_nodelist
data("literature") data("node_attributes") nodelist <- make_nodelist(literature, node_attributes = node_attributes) str(nodelist)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.