Send \R Output to a File

Usage

sink(file = NULL)

Arguments

file a character string naming the file to write to, or NULL to stop ``sink''ing.

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() or sink(file=NULL) ends the diversion.

Examples

sink("sink-examp.txt")
i <- 1:10
outer(i,i,"*")
sink()


[Package Contents]