frommatrix {backbone}R Documentation

Converts a backbone adjacency matrix to an object of specified class

Description

Converts a backbone adjacency matrix to an object of specified class

Usage

frommatrix(graph, convert = "matrix")

Arguments

graph

a matrix

convert

class to convert to, one of "matrix", "sparseMatrix", "igraph", "edgelist", or "network"

Value

backbone graph: Binary or signed backbone graph of class given in parameter 'convert'.

Examples

M <- matrix(sample(c(-1,0,1),5*5,replace=TRUE),5,5)
test <- backbone:::frommatrix(M, "Matrix")

[Package backbone version 1.5.1 Index]