frommatrix | R Documentation |
Converts a backbone adjacency matrix to a graph object of specified class
frommatrix(mat, attribs = NA, convert = "matrix")
mat |
an adjacency matrix |
attribs |
dataframe: vertex attributes to be assigned in igraph object |
convert |
class to convert to, one of "matrix", "Matrix", "igraph", or "edgelist" |
backbone graph: Binary or signed backbone graph of class convert
.
M <- matrix(sample(c(-1,0,1),5*5,replace=TRUE),5,5)
test <- backbone:::frommatrix(M, "Matrix")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.