.BG
.VE $Header: /usr3/s/current/s/.help/RCS/sink,v 1.3 83/12/30 19:34:28 rab Exp $
.FN sink
.TL
sink: Send S Output to the Diary or to a File
.CS
sink(file)
.PP
.AG file
optional,
logical value, or
character string giving the name of a file.
.PP
If `file' is TRUE, it indicates that S output
that is ordinarily typed on the terminal is
is to be appended to the diary file.
If `file' is a character string,
the output diverted to a file named `file'.
If `file' is FALSE or omitted,
any diversion is ended.
.PP
When output is being diverted to the diary or a sink file,
nothing appears on the terminal
except prompt characters, printer plots, and error messages.
.PP
The difference between `sink(TRUE)' and `sink("diary")' is that the first
expression causes output to be appended to the diary whereas the second
expression overwrites the diary.
.EX
diary  #turn on the diary
sink(T)      # divert output to the diary
regress(x,y)  # save regression output on diary
sink( )  # revert output to the terminal
.KW basic*
.KW file
.WR
