tidy_colnames: tidy_colnames

View source: R/tidy_colnames.R

tidy_colnamesR Documentation

tidy_colnames

Description

makes the data.frame have column names that are in tidy format.

Usage

tidy_colnames(data)

Arguments

data

data.frame that contains the column names to be converted

Details

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

Value

data.frame with tidy column names

Examples

# before
colnames(carData::Salaries)

# after
df <- carData::Salaries %>%
tidy_colnames(.)
colnames(df)

epongpipat/eepR documentation built on June 5, 2024, 10:03 a.m.