Description Usage Details Value Author(s) Examples
sinkSetup
establishes temporary files to capture output that
would normally be directed toward the screen, and redirects both
standard and error output to these files. sinkRetrieve
retrieves the output, and removes screen redirections so output again
appears on the screen.
1 2 |
These functions are used to redirect and then retrieve screen
output. Redirection is to objects created with file
, with
no arguments (i.e., a temporary file, unlinked from the file
system). Both standard output and error output are redirected.
User-level calls of sink
between calls to
sinkSetup
and sinkRetrieve
may confuse screen
(especially error) capture, likely resulting in warnings when
sinkRetrieve
is called.
sinkRetrieve
returns an object of
SinkOutput-class
, the slots of which contain vectors of
the lines of text directed toward the screen.
MT Morgan
1 2 3 4 5 6 7 8 | library(RWebServices)
sinkSetup()
ls()
try( fails())
f <- function() stop("fails in function f")
try( f())
sinkRetrieve()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.