format_column_names: Formats Column Names

View source: R/format_column_names.R

format_column_namesR Documentation

Formats Column Names

Description

Substitutes blank space " " in column names of the input data frame with "_". If there is no " " in the column names, return the data frame.

Usage

format_column_names(df)

Arguments

df

A data frame

Value

A data frame with no " " in its column names

Examples

df <- data.frame(`col Name 1` = c(1, 2),
                 `col Name 2` = c(3, 4), 
                 check.names = FALSE)
format_column_names(df)

DSCI-310/DSCI-310-Group-6-Package documentation built on April 21, 2022, 3:55 a.m.