fix_col_spaces: Replace spaces in column names with underscores

View source: R/fix_column_spaces.R

fix_col_spacesR Documentation

Replace spaces in column names with underscores

Description

This function takes a data frame as an argument and replaces all spaces in the column names with underscores.

Usage

fix_col_spaces(df)

Arguments

df

A data frame

Value

A modified data frame with spaces in column names replaced by underscores.

Examples

my_data <- data.frame("Column Name 1" = c(1, 2, 3), "Column Name 2" = c(4, 5, 6))

fix_col_spaces(my_data)
# Returns a data frame with column names where spaces are replaced by underscores.


fixr documentation built on April 4, 2025, 12:30 a.m.

Related to fix_col_spaces in fixr...