EVOLUTION-MANAGER
Edit File: expr_label.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: Find the expression associated with an argument</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 expr_label {lazyeval}"><tr><td>expr_label {lazyeval}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Find the expression associated with an argument</h2> <h3>Description</h3> <p><code>expr_find()</code> finds the full expression; <code>expr_text()</code> turns the expression into a single string; <code>expr_label()</code> formats it nicely for use in messages. <code>expr_env()</code> finds the environment associated with the expression. </p> <h3>Usage</h3> <pre> expr_label(x) expr_text(x, width = 60L, nlines = Inf) expr_find(x) expr_env(x, default_env) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>A promise (function argument)</p> </td></tr> <tr valign="top"><td><code>width</code></td> <td> <p>Width of each line</p> </td></tr> <tr valign="top"><td><code>nlines</code></td> <td> <p>Maximum number of lines to extract.</p> </td></tr> <tr valign="top"><td><code>default_env</code></td> <td> <p>If supplied, <code>expr_env</code> will return this if the promise has already been forced. Otherwise it will throw an error.</p> </td></tr> </table> <h3>Details</h3> <p>These functions never force promises, and will work even if a promise has previously been forced. </p> <h3>Examples</h3> <pre> # Unlike substitute(), expr_find() finds the original expression f <- function(x) g(x) g <- function(y) h(y) h <- function(z) list(substitute(z), expr_find(z)) f(1 + 2 + 3) expr_label(10) # Names a quoted with `` expr_label(x) # Strings are encoded expr_label("a\nb") # Expressions are captured expr_label(a + b + c) # Long expressions are collapsed expr_label(foo({ 1 + 2 print(x) })) </pre> <hr /><div style="text-align: center;">[Package <em>lazyeval</em> version 0.2.2 <a href="00Index.html">Index</a>]</div> </body></html>