EVOLUTION-MANAGER
Edit File: row_to_names.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: Elevate a row to be the column names of 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 row_to_names {janitor}"><tr><td>row_to_names {janitor}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Elevate a row to be the column names of a data.frame.</h2> <h3>Description</h3> <p>Elevate a row to be the column names of a data.frame. </p> <h3>Usage</h3> <pre> row_to_names(dat, row_number, remove_row = TRUE, remove_rows_above = TRUE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>dat</code></td> <td> <p>The input data.frame</p> </td></tr> <tr valign="top"><td><code>row_number</code></td> <td> <p>The row of <code>dat</code> containing the variable names</p> </td></tr> <tr valign="top"><td><code>remove_row</code></td> <td> <p>Should the row <code>row_number</code> be removed from the resulting data.frame?</p> </td></tr> <tr valign="top"><td><code>remove_rows_above</code></td> <td> <p>If <code>row_number != 1</code>, should the rows above <code>row_number</code> - that is, between <code>1:(row_number-1)</code> - be removed from the resulting data.frame?</p> </td></tr> </table> <h3>Value</h3> <p>A data.frame with new names (and some rows removed, if specified) </p> <h3>Examples</h3> <pre> x <- data.frame(X_1 = c(NA, "Title", 1:3), X_2 = c(NA, "Title2", 4:6)) x %>% row_to_names(row_number = 2) </pre> <hr /><div style="text-align: center;">[Package <em>janitor</em> version 2.1.0 <a href="00Index.html">Index</a>]</div> </body></html>