fixnames: standardize column names for a dataframe

Description Usage Arguments Examples

View source: R/fixnames.R

Description

standardize column names for a dataframe

Usage

1

Arguments

df

dataframe whose colnames you want to standardize

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Handling of periods in names:
# Assume that a period should be replaced by an underscore
# to preserve whatever separation of words was intended
# by the original inclusion of periods,  Don't
# want to simply remove them, but they're inconvenient.
# Replace periods with an underscore:
df <- mtcars
head(df)
names(df) <- paste0("_.", names(df), ")")
head(df)
names(df) <- fixnames(df)
head(df)
df

johnfrye/fryeR documentation built on Dec. 28, 2021, 6:20 p.m.