EVOLUTION-MANAGER
Edit File: evalCpp.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: Evaluate a C++ Expression</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 evalCpp {Rcpp}"><tr><td>evalCpp {Rcpp}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Evaluate a C++ Expression </h2> <h3>Description</h3> <p>Evaluates a C++ expression. This creates a C++ function using <code><a href="cppFunction.html">cppFunction</a></code> and calls it to get the result. </p> <h3>Usage</h3> <pre> evalCpp(code, depends = character(), plugins = character(), includes = character(), rebuild = FALSE, cacheDir = getOption("rcpp.cache.dir", tempdir()), showOutput = verbose, verbose = getOption("verbose")) areMacrosDefined(names, depends = character(), includes = character(), rebuild = FALSE, showOutput = verbose, verbose = getOption("verbose")) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>code</code></td> <td> <p>C++ expression to evaluate </p> </td></tr> <tr valign="top"><td><code>names</code></td> <td> <p>names of the macros we want to test </p> </td></tr> <tr valign="top"><td><code>plugins</code></td> <td> <p>see <code><a href="cppFunction.html">cppFunction</a></code> </p> </td></tr> <tr valign="top"><td><code>depends</code></td> <td> <p>see <code><a href="cppFunction.html">cppFunction</a></code> </p> </td></tr> <tr valign="top"><td><code>includes</code></td> <td> <p>see <code><a href="cppFunction.html">cppFunction</a></code> </p> </td></tr> <tr valign="top"><td><code>rebuild</code></td> <td> <p>see <code><a href="cppFunction.html">cppFunction</a></code> </p> </td></tr> <tr valign="top"><td><code>cacheDir</code></td> <td> <p>Directory to use for caching shared libraries. If the underlying code passed to <code>sourceCpp</code> has not changed since the last invocation then a cached version of the shared library is used. The default value of <code>tempdir()</code> results in the cache being valid only for the current R session. Pass an alternate directory to preserve the cache across R sessions. </p> </td></tr> <tr valign="top"><td><code>showOutput</code></td> <td> <p>see <code><a href="cppFunction.html">cppFunction</a></code> </p> </td></tr> <tr valign="top"><td><code>verbose</code></td> <td> <p>see <code><a href="cppFunction.html">cppFunction</a></code> </p> </td></tr> </table> <h3>Value</h3> <p>The result of the evaluated C++ expression. </p> <h3>Note</h3> <p>The result type of the C++ expression must be compatible with <code>Rcpp::wrap</code>. </p> <h3>See Also</h3> <p><code><a href="sourceCpp.html">sourceCpp</a></code>, <code><a href="cppFunction.html">cppFunction</a></code> </p> <h3>Examples</h3> <pre> ## Not run: evalCpp( "__cplusplus" ) evalCpp( "std::numeric_limits<double>::max()" ) areMacrosDefined( c("__cplusplus", "HAS_TR1" ) ) ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>Rcpp</em> version 1.0.5 <a href="00Index.html">Index</a>]</div> </body></html>