File: write.matrix.Rd

package info (click to toggle)
vr 7.2.12-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,228 kB
  • ctags: 182
  • sloc: ansic: 2,393; makefile: 28; sh: 28
file content (51 lines) | stat: -rw-r--r-- 1,333 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
% file MASS/write.matrix.d
% copyright (C) 1994-2002 W. N. Venables and B. D. Ripley
%
\name{write.matrix}
\alias{write.matrix}
\title{
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{
\item{x}{
  matrix or data frame.
}
\item{file}{
  name of output file. The default (\code{""}) is the console.
}
\item{sep}{
  The separator between columns.
}
\item{blocksize}{
  If supplied and positive, the output is written in blocks of
  \code{blocksize} rows.  Choose as large as possible consistent with
  the amount of memory available.
}}
\details{
  If \code{x} is a matrix, supplying \code{blocksize} is more
  memory-efficient and enables larger matrices to be written, but each
  block of rows might be formatted slightly differently.

  If \code{x} is a data frame, the conversion to a matrix may negate the
  memory saving.
}
\section{Side Effects}{
  A formatted file is produced, with column headings (if \code{x} has them)
  and columns of data.
}
\references{
  Venables, W. N. and Ripley, B. D. (2002)
  \emph{Modern Applied Statistics with S.} Fourth edition.  Springer.
}
\seealso{
  \code{\link{write.table}}
}
\keyword{file}
\keyword{print}