Skip to contents

Create graph from R objects

Usage

as_igraph(x)

# Default S3 method
as_igraph(x)

# S3 method for class 'matrix'
as_igraph(x)

# S3 method for class 'data.frame'
as_igraph(x)

graph_from_data_frame(df, directed = TRUE)

graph_from_symbolic_edgelist(edgelist, directed = TRUE)

graph_from_edgelist(edgelist, directed = TRUE)

Arguments

x

A vector, matrix, or data.frame.

df

data.frame that includes an edgelist and edge attributes.

directed

Boolean

edgelist

Two-column matrix.