clean.df: Clean the names of a data frame

View source: R/clean.df.R

clean.dfR Documentation

Clean the names of a data frame

Description

Clean up a data frame by changing all column names to lower case, removing spaces and punctuation.

Usage

clean.df(df, keep.underscore = TRUE, pidmpattern = "bannerid|banner_id")

Arguments

df

a data frame

keep.underscore

a logical value indicating whether underscores be kept or removed

pidmpattern

a regular expression to be matched against the names of df. Set to NULL to turn off pattern mathing.

Details

If no column named pidm is found and pidmpattern is not NULL, then we look if there's only

Value

a data frame of class tbl_df.


crazybilly/ucbudar documentation built on July 15, 2024, 5:03 p.m.