Description Usage Arguments Value Examples
repair_names()
ensures its input has non-missing and
unique names (duplicated names get a numeric suffix). Valid names are
left as is.
1 | repair_names(x, prefix = "V", sep = "")
|
x |
A named vector. |
prefix |
A string, the prefix to use for new column names. |
sep |
A string inserted between the column name and de-duplicating number. |
x
with valid names.
1 2 3 4 5 | repair_names(list(3, 4, 5)) # works for lists, too
repair_names(mtcars) # a no-op
tbl <- as_tibble(structure(list(3, 4, 5), class = "data.frame"),
validate = FALSE)
repair_names(tbl)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.