write.matrix {MASS}R Documentation

Write a Matrix or Data Frame

Description

Writes a matrix or data frame to a file or the console, using column labels and a layout respecting columns.

Usage

write.matrix(x, file="", sep=" ", blocksize)

Arguments

x matrix or data frame.
file name of output file. The default ("") is the console.
sep The separator between columns.
blocksize If supplied and positive, the output is written in blocks of blocksize rows.

Details

Supplying blocksize is more memory-efficient and enables larger matrices to be writted, but each block of rows might be formatted slightly differently.

Side Effects

A formatted file is produced, with column headings (if x has them) and columns of data.

See Also

write.table


[Package Contents]