construct_graph: Construct graph from data.frame

Description Usage Arguments Author(s)

Description

Construct graph from data.frame

Usage

1
2
construct_graph(E, V = NULL, ecols = c(1, 2), vcol = 1,
  mode = "undirected")

Arguments

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

Author(s)

Christopher Nobles, Ph.D.


cnobles/spraphal documentation built on May 28, 2019, 7:35 p.m.