tomatrix: Converts an input graph object to an adjacency/incidence...

View source: R/utils.R

tomatrixR Documentation

Converts an input graph object to an adjacency/incidence matrix and identifies its characteristics

Description

Converts an input graph object to an adjacency/incidence matrix and identifies its characteristics

Usage

tomatrix(graph)

Arguments

graph

A graph object of class "matrix", "Matrix", "dataframe", igraph.

Value

a list(summary, G, attribs) summary is a dataframe containing characteristics of the supplied object G is an adjacency/incidence matrix attribs is a dataframe containing vertex attributes (if present in graph)

Examples

M <- matrix(rbinom(5*5,1,.5),5,5)
test <- backbone:::tomatrix(M)

backbone documentation built on Oct. 19, 2022, 1:09 a.m.