Description Usage Arguments Details Value Examples
View source: R/graph.utility.R
Transform a Weighted Adjacency Matrix (wadj matrix) of a graph in a tupla, i.e. as a sequences of rows separated by
blank and the weight of the edges, e.g nodeX nodeY score
.
1 | tupla.matrix(m, output.file = "net.file.gz")
|
m |
a weighted adjacency matrix of the graph. Rows and columns are examples. It must be a square named matrix. |
output.file |
name of the file of the to be written. The extension of the file can be or plain format (".txt") or compressed (".gz"). |
Only the non-zero interactions are kept, while the zero interactions are discarded.
In other words in the output.file
are reported only those nodes having a weight different from zero.
the weighted adjacency matrix as tupla is stored in the output.file.
1 2 3 4 | data(wadj);
tmpdir <- paste0(tempdir(),"/");
tupla.matrix(W, output.file=paste0(tmpdir,"graph.edges.txt.gz"));
tupla.matrix(W, output.file=paste0(tmpdir,"graph.edges.txt"));
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.