frommatrix: Converts a backbone adjacency matrix to an object of...

Description Usage Arguments Value Examples

View source: R/model.helpers.R

Description

Converts a backbone adjacency matrix to an object of specified class

Usage

1
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

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

backbone documentation built on Sept. 18, 2021, 1:07 a.m.