nice_names: Format column names into standard format.

View source: R/nice_utilities.R

nice_namesR Documentation

Format column names into standard format.

Description

Turns column names of data frames into standardised format. Dots are replaced with underscores, trailing underscores are removed and everything is made lower case. Punctuation and spaces are also replaced by underscores and double underscores are removed last

Usage

nice_names(x)

Arguments

x

A data frame

Examples

data(mtcars)
names(mtcars) <- toupper(names(mtcars))
names(mtcars) <- nice_names(mtcars)

simonthelwall/nicethings documentation built on Feb. 27, 2023, 3:15 p.m.