Description Usage Arguments Details Value Examples
View source: R/standard_names.R
Standardizes column names by converting the strings to lowercase, removing white space, and removing all non-alphanumeric characters and replacing them with a specified character.
1 2 | standard_names(x, remove.non.alphanumeric.char = TRUE,
replacement.char = "_")
|
x |
A data frame or tibble. |
remove.non.alphanumeric.char |
If FALSE, all non-alphanumeric characters will be unaltered. If TRUE, all non-alphanumeric characters will be replaced by a specified character. Default: TRUE |
replacement.char |
The character(s) used to replace all of the non-alphanumeric characters., Default: '_' |
DETAILS
A data fram with standardized column names.
1 2 3 4 5 6 7 8 9 | ## Not run:
if(interactive()){
data("iris")
test.df <- head(iris)
standard_names(test.df)
standard_names(test.df, replacement.char = "+")
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.