frommatrix {backbone} | R Documentation |
Converts a backbone adjacency matrix to an object of specified class
frommatrix(graph, convert = "matrix")
graph |
a matrix |
convert |
class to convert to, one of "matrix", "sparseMatrix", "igraph", "edgelist", or "network" |
backbone graph: Binary or signed backbone graph of class given in parameter 'convert'.
M <- matrix(sample(c(-1,0,1),5*5,replace=TRUE),5,5) test <- backbone:::frommatrix(M, "Matrix")