Resulting names are unique and consist only of the
_ character, numbers, and letters.
Capitalization preferences can be specified using the
Accented characters are transliterated to ASCII. For example, an "o" with a German umlaut over it becomes "o", and the Spanish character "enye" becomes "n".
This function takes and returns a data.frame, for ease of piping with
For the underlying function that works on a character vector of names,
1 2 3 4 5 6 7
the input data.frame.
The desired target case (default is
Returns the data.frame with clean names.
1 2 3 4 5 6 7 8 9 10 11 12
# not run: # clean_names(poorly_named_df) # or pipe in the input data.frame: # poorly_named_df %>% clean_names() # if you prefer camelCase variable names: # poorly_named_df %>% clean_names(., "small_camel") # not run: # library(readxl) # read_excel("messy_excel_file.xlsx") %>% clean_names()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.