EVOLUTION-MANAGER
Edit File: engine_output.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: An output wrapper for language engine output</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 engine_output {knitr}"><tr><td>engine_output {knitr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>An output wrapper for language engine output</h2> <h3>Description</h3> <p>If you have designed a language engine, you may call this function in the end to format and return the text output from your engine. </p> <h3>Usage</h3> <pre> engine_output(options, code, out, extra = NULL) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>options</code></td> <td> <p>A list of chunk options. Usually this is just the object <code>options</code> passed to the engine function; see <code><a href="knit_engines.html">knit_engines</a></code>.</p> </td></tr> <tr valign="top"><td><code>code</code></td> <td> <p>Source code of the chunk, to which the output hook <code>source</code> is applied, unless the chunk option <code>echo</code> is <code>FALSE</code>.</p> </td></tr> <tr valign="top"><td><code>out</code></td> <td> <p>Text output from the engine, to which the hook <code>output</code> is applied, unless the chunk option <code>results</code> is <code>'hide'</code></p> </td></tr> <tr valign="top"><td><code>extra</code></td> <td> <p>Any additional text output that you want to include.</p> </td></tr> </table> <h3>Details</h3> <p>For expert users, an advanced usage of this function is <code>engine_output(options, out = LIST)</code> where <code>LIST</code> is a list that has the same structure as the output of <code>evaluate::evaluate()</code>. In this case, the arguments <code>code</code> and <code>extra</code> are ignored, and the list is passed to an internal function <code>knitr:::wrap()</code> to return a character vector of final output. </p> <h3>Value</h3> <p>A character string generated from the source code and output using the appropriate output hooks. </p> <h3>Examples</h3> <pre> library(knitr) engine_output(opts_chunk$merge(list(engine = "Rscript")), code = "1 + 1", out = "[1] 2") engine_output(opts_chunk$merge(list(echo = FALSE, engine = "Rscript")), code = "1 + 1", out = "[1] 2") # expert use only engine_output(opts_chunk$merge(list(engine = "python")), out = list(structure(list(src = "1 + 1"), class = "source"), "2")) </pre> <hr /><div style="text-align: center;">[Package <em>knitr</em> version 1.29 <a href="00Index.html">Index</a>]</div> </body></html>