powered by
Converts a backbone adjacency matrix to an object of specified class
frommatrix(graph, attribs = NA, convert = "matrix")
backbone graph: Binary or signed backbone graph of class given in parameter convert.
convert
a matrix
dataframe: vertex attributes to be assigned in igraph object
class to convert to, one of "matrix", "Matrix", "igraph", or "edgelist"
M <- matrix(sample(c(-1,0,1),5*5,replace=TRUE),5,5) test <- backbone:::frommatrix(M, "Matrix")
Run the code above in your browser using DataLab