tupla.matrix: Tupla matrix

Description Usage Arguments Details Value Examples

View source: R/graph.utility.R

Description

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

Usage

1
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

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

HEMDAG documentation built on Feb. 12, 2021, 5:13 p.m.