The R Project SVN R

Rev

Rev 27447 | Rev 30912 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27447 Rev 28045
Line 1... Line 1...
1
\name{sink}
1
\name{sink}
2
\alias{sink}
2
\alias{sink}
3
\alias{sink.number}
3
\alias{sink.number}
4
\title{Send R Output to a File}
4
\title{Send R Output to a File}
5
\usage{
5
\usage{
6
sink(file = NULL, append = FALSE, type = c("output", "message"))
6
sink(file = NULL, append = FALSE, type = c("output", "message"), split=FALSE)
7
sink.number(type = c("output", "message"))
7
sink.number(type = c("output", "message"))
8
}
8
}
9
\arguments{
9
\arguments{
10
  \item{file}{a connection or a character string naming the
10
  \item{file}{a connection or a character string naming the
11
    file to write to, or \code{NULL} to stop sink-ing.}
11
    file to write to, or \code{NULL} to stop sink-ing.}
12
  \item{append}{logical. If \code{TRUE}, output will be appended to
12
  \item{append}{logical. If \code{TRUE}, output will be appended to
13
    \code{file}; otherwise, it will overwrite the contents of
13
    \code{file}; otherwise, it will overwrite the contents of
14
    \code{file}.}
14
    \code{file}.}
15
  \item{type}{character. Either the output stream or the messages stream.}
15
  \item{type}{character. Either the output stream or the messages
-
 
16
    stream.}
-
 
17
  \item{split}{logical: if \code{TRUE}, output will be sent to the new
-
 
18
    sink and to the current output stream.}
16
}
19
}
17
\description{
20
\description{
18
  \code{sink} diverts \R output to a connection.
21
  \code{sink} diverts \R output to a connection.
19
 
22
 
20
  \code{sink.number()} reports how many diversions are in use.
23
  \code{sink.number()} reports how many diversions are in use.