Description Usage Arguments Author(s)
Construct graph from data.frame
1 2 | construct_graph(E, V = NULL, ecols = c(1, 2), vcol = 1,
mode = "undirected")
|
E |
data.frame with edgelist information, by default the first two columns should contain the vertex connection data. This can be changed with the 'ecols' parameter. Additional data will be assimilated into the graph as edge attributes. |
V |
data.frame with vertex information. Vertices not present in the edgelist will be included as vertices with no edges in the output graph. If nothing supplied, only vertices present in edgelist data.frame will be present in the graph. Additional data will be assimilated into the graph as vertex attributes. |
ecols |
numeric vector of length 2, specifying the columns of the data.frame E that contain the edgelist information. |
vcol |
numeric vector of length 1, specifying the column with vertex identifier information within the data.frame V. |
mode |
character. Indicates if the graph is a directed or undirected |
Christopher Nobles, Ph.D.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.