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")

KGodard1/Fastball-SourceCpp documentation built on Dec. 18, 2021, 2:35 a.m.