EVOLUTION-MANAGER
Edit File: new_output_handler.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Custom output handlers.</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for new_output_handler {evaluate}"><tr><td>new_output_handler {evaluate}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Custom output handlers.</h2> <h3>Description</h3> <p>An <code>output_handler</code> handles the results of <code><a href="evaluate.html">evaluate()</a></code>, including the values, graphics, conditions. Each type of output is handled by a particular function in the handler object. </p> <h3>Usage</h3> <pre> new_output_handler(source = identity, text = identity, graphics = identity, message = identity, warning = identity, error = identity, value = render) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>source</code></td> <td> <p>Function to handle the echoed source code under evaluation.</p> </td></tr> <tr valign="top"><td><code>text</code></td> <td> <p>Function to handle any textual console output.</p> </td></tr> <tr valign="top"><td><code>graphics</code></td> <td> <p>Function to handle graphics, as returned by <code><a href="../../grDevices/html/recordplot.html">recordPlot()</a></code>.</p> </td></tr> <tr valign="top"><td><code>message</code></td> <td> <p>Function to handle <code><a href="../../base/html/message.html">message()</a></code> output.</p> </td></tr> <tr valign="top"><td><code>warning</code></td> <td> <p>Function to handle <code><a href="../../base/html/warning.html">warning()</a></code> output.</p> </td></tr> <tr valign="top"><td><code>error</code></td> <td> <p>Function to handle <code><a href="../../base/html/stop.html">stop()</a></code> output.</p> </td></tr> <tr valign="top"><td><code>value</code></td> <td> <p>Function to handle the values returned from evaluation. If it only has one argument, only visible values are handled; if it has more arguments, the second argument indicates whether the value is visible.</p> </td></tr> </table> <h3>Details</h3> <p>The handler functions should accept an output object as their first argument. The return value of the handlers is ignored, except in the case of the <code>value</code> handler, where a visible return value is saved in the output list. </p> <p>Calling the constructor with no arguments results in the default handler, which mimics the behavior of the console by printing visible values. </p> <p>Note that recursion is common: for example, if <code>value</code> does any printing, then the <code>text</code> or <code>graphics</code> handlers may be called. </p> <h3>Value</h3> <p>A new <code>output_handler</code> object </p> <hr /><div style="text-align: center;">[Package <em>evaluate</em> version 0.14 <a href="00Index.html">Index</a>]</div> </body></html>