EVOLUTION-MANAGER
Edit File: rdply.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: Replicate expression and return results in a data frame.</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 rdply {plyr}"><tr><td>rdply {plyr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Replicate expression and return results in a data frame.</h2> <h3>Description</h3> <p>Evaluate expression n times then combine results into a data frame </p> <h3>Usage</h3> <pre> rdply(.n, .expr, .progress = "none", .id = NA) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>.n</code></td> <td> <p>number of times to evaluate the expression</p> </td></tr> <tr valign="top"><td><code>.expr</code></td> <td> <p>expression to evaluate</p> </td></tr> <tr valign="top"><td><code>.progress</code></td> <td> <p>name of the progress bar to use, see <code><a href="create_progress_bar.html">create_progress_bar</a></code></p> </td></tr> <tr valign="top"><td><code>.id</code></td> <td> <p>name of the index column. Pass <code>NULL</code> to avoid creation of the index column. For compatibility, omit this argument or pass <code>NA</code> to use <code>".n"</code> as column name.</p> </td></tr> </table> <h3>Details</h3> <p>This function runs an expression multiple times, and combines the result into a data frame. If there are no results, then this function returns a data frame with zero rows and columns (<code>data.frame()</code>). This function is equivalent to <code><a href="../../base/html/lapply.html">replicate</a></code>, but will always return results as a data frame. </p> <h3>Value</h3> <p>a data frame </p> <h3>References</h3> <p>Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, 40(1), 1-29. <a href="https://www.jstatsoft.org/v40/i01/">https://www.jstatsoft.org/v40/i01/</a>. </p> <h3>Examples</h3> <pre> rdply(20, mean(runif(100))) rdply(20, each(mean, var)(runif(100))) rdply(20, data.frame(x = runif(2))) </pre> <hr /><div style="text-align: center;">[Package <em>plyr</em> version 1.8.7 <a href="00Index.html">Index</a>]</div> </body></html>