View source: R/tidy_colnames.R
tidy_colnames | R Documentation |
makes the data.frame have column names that are in tidy format.
tidy_colnames(data)
data |
data.frame that contains the column names to be converted |
currently, does the following modifications: 1. lower-case 2. replaces: - periods with underscores - space with underscores - double underscore with one underscore - parentheses with underscore - brackets with underscore - forward and backward slashes with underscore - dash with underscore - e_mail with email - removes trailing white space and trailing underscores
data.frame with tidy column names
# before
colnames(carData::Salaries)
# after
df <- carData::Salaries %>%
tidy_colnames(.)
colnames(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.