This help topic is for R version 0.60. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/sink.html
sink {base}R Documentation

Send R Output to a File

Description

sink(file) diverts all R output to file (overwriting the file if it already exists; appending is not supported yet). Only prompts and error messages continue to appear on the terminal.

sink() ends the diversion.

Usage

sink()
sink(file)

Arguments

file

a character string naming the file to write to.


[Package base version 0.60 ]