EVOLUTION-MANAGER
Edit File: quoted.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: Quote variables to create a list of unevaluated expressions...</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 . {plyr}"><tr><td>. {plyr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Quote variables to create a list of unevaluated expressions for later evaluation.</h2> <h3>Description</h3> <p>This function is similar to <code><a href="../../base/html/tilde.html">~</a></code> in that it is used to capture the name of variables, not their current value. This is used throughout plyr to specify the names of variables (or more complicated expressions). </p> <h3>Usage</h3> <pre> .(..., .env = parent.frame()) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>...</code></td> <td> <p>unevaluated expressions to be recorded. Specify names if you want the set the names of the resultant variables</p> </td></tr> <tr valign="top"><td><code>.env</code></td> <td> <p>environment in which unbound symbols in <code>...</code> should be evaluated. Defaults to the environment in which <code>.</code> was executed.</p> </td></tr> </table> <h3>Details</h3> <p>Similar tricks can be performed with <code><a href="../../base/html/substitute.html">substitute</a></code>, but when functions can be called in multiple ways it becomes increasingly tricky to ensure that the values are extracted from the correct frame. Substitute tricks also make it difficult to program against the functions that use them, while the <code>quoted</code> class provides <code>as.quoted.character</code> to convert strings to the appropriate data structure. </p> <h3>Value</h3> <p>list of symbol and language primitives </p> <h3>Examples</h3> <pre> .(a, b, c) .(first = a, second = b, third = c) .(a ^ 2, b - d, log(c)) as.quoted(~ a + b + c) as.quoted(a ~ b + c) as.quoted(c("a", "b", "c")) # Some examples using ddply - look at the column names ddply(mtcars, "cyl", each(nrow, ncol)) ddply(mtcars, ~ cyl, each(nrow, ncol)) ddply(mtcars, .(cyl), each(nrow, ncol)) ddply(mtcars, .(log(cyl)), each(nrow, ncol)) ddply(mtcars, .(logcyl = log(cyl)), each(nrow, ncol)) ddply(mtcars, .(vs + am), each(nrow, ncol)) ddply(mtcars, .(vsam = vs + am), each(nrow, ncol)) </pre> <hr /><div style="text-align: center;">[Package <em>plyr</em> version 1.8.7 <a href="00Index.html">Index</a>]</div> </body></html>