mat.write: Writes Matrix Data to a File

Description Usage Arguments Details Value Author(s) See Also

View source: R/mat.write.r

Description

Matrix data are written to a specified output file.

Usage

1
mat.write(mat, file.name, ij = FALSE, sym = FALSE, sparse=FALSE, formatted=TRUE)

Arguments

mat

matrix which should be written

file.name

file name

ij

logical, if TRUE the format in the file will be: i\quad j\quad value, otherwise each row of the file represents one row in the matrix

sym

logical, if TRUE the matrix is symmetric, only important if ij = TRUE

sparse

logical, if TRUE the matrix is written in sparse format (e.g. only non-zero values are written to the file), only important if ij = TRUE

formatted

logical, if TRUE a blank line is inserted after all entries of one row, only important if ij = TRUE

Details

In general there are two ways the output file can be written. First the matrix can be written to the file as write.table does and second the file can be written with the form: i\quad j\quad value, this means the value at position [i,j]. If the latter by ij = TRUE is selected, three more options can be chosen. If sym = TRUE the output file just contains the upper triangle and the diagonal of the matrix. If spase = TRUE only non-zero values are written. If formatted = TRUE a blank line seperates the entries of different rows.

Value

No values are returned.

Author(s)

Philipp Weil

See Also

mat.read


BioPhysConnectoR documentation built on May 30, 2017, 6:46 a.m.