tupla.matrix {HEMDAG}R Documentation

Tupla matrix

Description

Transform a named score matrix in a tupla, i.e. in the form nodeX nodeY score.

Usage

tupla.matrix(m, output.file = "net.file.gz", digits = 3)

Arguments

m

a named score matrix. It can be either a m x n matrix (where m are example and n are functional terms, e.g. GO terms) or it can be a square named matrix m x m, where m are examples.

output.file

name of the file on which the matrix must be written.

digits

number of digits to be used to save scores of m (def. digits=3). The extension of the file can be plain (".txt") or compressed (".gz").

Details

Only the non-zero interactions are kept, while the zero interactions are discarded.

Value

A tupla score matrix stored in output.file.

Examples

data(wadj);
file <- tempfile();
tupla.matrix(W, output.file=file, digits=3);

[Package HEMDAG version 2.7.4 Index]