View source: R/standardize_names.R
standardize_names | R Documentation |
Standardize all elements of a character vector to the same syntax. All letters are converted to lowercase, special characters are converted to underscores (snake_case) or removed (camelCase), and multiple and trailing (but not leading) special characters are removed. By default, elements are deduplicated by appending "_1" (snake_case) or "1" (camelCase) and so on.
standardize_names(x, dedup = TRUE, case = "snake_case")
x |
character vector with elements to be standardized |
dedup |
logical, whether to deduplicate the vector elements. If TRUE, elements that are identical after standardization are deduplicated by appending "_1", "_2", etc. Defaults to TRUE. |
case |
character, whether to standardize to "snake_case" or "camelCase" case. Defaults to "snake_case". Partial matches are okay. |
a character vector of the same length as x
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.