EVOLUTION-MANAGER
Edit File: name_rows.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: Toggle row names between explicit and implicit.</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 name_rows {plyr}"><tr><td>name_rows {plyr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Toggle row names between explicit and implicit.</h2> <h3>Description</h3> <p>Plyr functions ignore row names, so this function provides a way to preserve them by converting them to an explicit column in the data frame. After the plyr operation, you can then apply <code>name_rows</code> again to convert back from the explicit column to the implicit <code>rownames</code>. </p> <h3>Usage</h3> <pre> name_rows(df) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>df</code></td> <td> <p>a data.frame, with either <code>rownames</code>, or a column called <code>.rownames</code>.</p> </td></tr> </table> <h3>Examples</h3> <pre> name_rows(mtcars) name_rows(name_rows(mtcars)) df <- data.frame(a = sample(10)) arrange(df, a) arrange(name_rows(df), a) name_rows(arrange(name_rows(df), a)) </pre> <hr /><div style="text-align: center;">[Package <em>plyr</em> version 1.8.7 <a href="00Index.html">Index</a>]</div> </body></html>