Learn R Programming

radiant.data (version 1.0.6)

fix_names: Ensure column names are valid

Description

Ensure column names are valid

Usage

fix_names(x, lower = FALSE)

Arguments

x

Data.frame or vector of (column) names

lower

Set letters to lower case (TRUE or FALSE)

Details

Remove symbols, trailing and leading spaces, and convert to valid R column names. Opinionated version of make.names

Examples

Run this code
# NOT RUN {
fix_names(c(" var-name ", "$amount spent", "100"))
# }

Run the code above in your browser using DataLab