matrix2graph: Convert a matrix or column-sparse matrix to a list of edges...

Description Usage Arguments Value Note See Also Examples

Description

Convert a matrix or column-sparse matrix to a list of edges and nodes for use by graphjs.

Usage

1

Arguments

M

either a matrix or any of the possible column sparse matrix objects from the Matrix package.

Value

A list with node and edges data frame entries used by graphjs.

Note

Numeric graphs are assumed to be weighted and the edge "size" values are set to the corresponding matrix entries.

See Also

graphjs, graph2Matrix

Examples

1
2
3
data(LeMis)
M <- graph2Matrix(LeMis$edges, LeMis$nodes)
G <- matrix2graph(M)


Search within the threejs package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.