

   SSeenndd OOuuttppuutt ttoo aa FFiillee

        sink(file = NULL, append = FALSE)

   AArrgguummeennttss::

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

     append: if `TRUE', output will be appended to `file'; oth-
             erwise, it will overwrite the contents of `file'.

   DDeessccrriippttiioonn::

        Diverts all R output to `file', overwriting the file
        unless `append' is `TRUE'.

   DDeettaaiillss::

        Only prompts and error messages continue to appear on
        the terminal.

        `sink()' or `sink(file=NULL)' ends the diversion.

   EExxaammpplleess::

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

