EVOLUTION-MANAGER
Edit File: name-repair-superseded.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: Superseded functions for name repair</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-repair-superseded {tibble}"><tr><td>name-repair-superseded {tibble}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Superseded functions for name repair</h2> <h3>Description</h3> <p><a href="https://lifecycle.r-lib.org/articles/stages.html#superseded"><img src="../help/figures/lifecycle-superseded.svg" alt='[Superseded]' /></a> </p> <p><code>tidy_names()</code>, <code>set_tidy_names()</code>, and <code>repair_names()</code> were early efforts to facilitate <em>post hoc</em> name repair in tibble, given that <code><a href="tibble.html">tibble()</a></code> and <code><a href="as_tibble.html">as_tibble()</a></code> did not do this. </p> <p>From tibble v2.0.0, the <code>.name_repair</code> argument gives direct access to three specific levels of name repair: <code>minimal</code>, <code>unique</code>, and <code>universal</code>. See <code><a href="../../vctrs/html/vec_as_names.html">vctrs::vec_as_names()</a></code> for the implementation of the underlying logic. </p> <h3>Usage</h3> <pre> tidy_names(name, syntactic = FALSE, quiet = FALSE) set_tidy_names(x, syntactic = FALSE, quiet = FALSE) repair_names(x, prefix = "V", sep = "") </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>name</code></td> <td> <p>A <code>names</code> attribute, usually a character vector.</p> </td></tr> <tr valign="top"><td><code>syntactic</code></td> <td> <p>Should names be made syntactically valid? If <code>FALSE</code>, uses same logic as <code>.name_repair = "unique"</code>. If <code>TRUE</code>, uses same logic as <code>.name_repair = "universal"</code>.</p> </td></tr> <tr valign="top"><td><code>quiet</code></td> <td> <p>Whether to suppress messages about name repair.</p> </td></tr> <tr valign="top"><td><code>x</code></td> <td> <p>A vector.</p> </td></tr> <tr valign="top"><td><code>prefix</code></td> <td> <p>A string, the prefix to use for new column names.</p> </td></tr> <tr valign="top"><td><code>sep</code></td> <td> <p>A string inserted between the column name and de-duplicating number.</p> </td></tr> </table> <h3>Value</h3> <p><code>x</code> with repaired names or a repaired version of <code>name</code>. </p> <h3>Life cycle</h3> <p>These functions are superseded. The <code>repair_names()</code> logic will also remain available in <code><a href="../../vctrs/html/vec_as_names_legacy.html">vctrs::vec_as_names_legacy()</a></code>. </p> <div class="sourceCode"><pre>tibble(..., `.name_repair = "unique"`) ## is preferred to df <- tibble(...) set_tidy_names(df, syntactic = FALSE) tibble(..., `.name_repair = "universal"`) ## is preferred to df <- tibble(...) set_tidy_names(df, syntactic = TRUE) </pre></div> <hr /><div style="text-align: center;">[Package <em>tibble</em> version 3.1.8 <a href="00Index.html">Index</a>]</div> </body></html>