EVOLUTION-MANAGER
Edit File: plyr.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: plyr: the split-apply-combine paradigm for R.</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 {plyr}"><tr><td>plyr {plyr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>plyr: the split-apply-combine paradigm for R.</h2> <h3>Description</h3> <p>The plyr package is a set of clean and consistent tools that implement the split-apply-combine pattern in R. This is an extremely common pattern in data analysis: you solve a complex problem by breaking it down into small pieces, doing something to each piece and then combining the results back together again. </p> <h3>Details</h3> <p>The plyr functions are named according to what sort of data structure they split up and what sort of data structure they return: </p> <dl> <dt>a</dt><dd><p>array</p> </dd> <dt>l</dt><dd><p>list</p> </dd> <dt>d</dt><dd><p>data.frame</p> </dd> <dt>m</dt><dd><p>multiple inputs</p> </dd> <dt>r</dt><dd><p>repeat multiple times</p> </dd> <dt>_</dt><dd><p>nothing</p> </dd> </dl> <p>So <code><a href="ddply.html">ddply</a></code> takes a data frame as input and returns a data frame as output, and <code><a href="l_ply.html">l_ply</a></code> takes a list as input and returns nothing as output. </p> <h3>Row names</h3> <p>By design, no plyr function will preserve row names - in general it is too hard to know what should be done with them for many of the operations supported by plyr. If you want to preserve row names, use <code><a href="name_rows.html">name_rows</a></code> to convert them into an explicit column in your data frame, perform the plyr operations, and then use <code><a href="name_rows.html">name_rows</a></code> again to convert the column back into row names. </p> <h3>Helpers</h3> <p>Plyr also provides a set of helper functions for common data analysis problems: </p> <ul> <li> <p><code><a href="arrange.html">arrange</a></code>: re-order the rows of a data frame by specifying the columns to order by </p> </li> <li> <p><code><a href="mutate.html">mutate</a></code>: add new columns or modifying existing columns, like <code><a href="../../base/html/transform.html">transform</a></code>, but new columns can refer to other columns that you just created. </p> </li> <li> <p><code><a href="summarise.html">summarise</a></code>: like <code><a href="mutate.html">mutate</a></code> but create a new data frame, not preserving any columns in the old data frame. </p> </li> <li> <p><code><a href="join.html">join</a></code>: an adapation of <code><a href="../../base/html/merge.html">merge</a></code> which is more similar to SQL, and has a much faster implementation if you only want to find the first match. </p> </li> <li> <p><code><a href="match_df.html">match_df</a></code>: a version of <code><a href="join.html">join</a></code> that instead of returning the two tables combined together, only returns the rows in the first table that match the second. </p> </li> <li> <p><code><a href="colwise.html">colwise</a></code>: make any function work colwise on a dataframe </p> </li> <li> <p><code><a href="rename.html">rename</a></code>: easily rename columns in a data frame </p> </li> <li> <p><code><a href="round_any.html">round_any</a></code>: round a number to any degree of precision </p> </li> <li> <p><code><a href="count.html">count</a></code>: quickly count unique combinations and return return as a data frame. </p> </li></ul> <hr /><div style="text-align: center;">[Package <em>plyr</em> version 1.8.7 <a href="00Index.html">Index</a>]</div> </body></html>