Learn R Programming

backbone (version 1.4.0)

frommatrix: Converts a backbone adjacency matrix to an object of specified class

Description

Converts a backbone adjacency matrix to an object of specified class

Usage

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

Run this code
# NOT RUN {
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