set_std_col_names: Standardize column names Make lower case R compliant names...

View source: R/set_std_col_names.R

set_std_col_namesR Documentation

Standardize column names Make lower case R compliant names that use an underscore rather than a dot and remove apostrophes. Multiple underscores are reduced to one.

Description

Standardize column names Make lower case R compliant names that use an underscore rather than a dot and remove apostrophes. Multiple underscores are reduced to one.

Usage

set_std_col_names(
  name_list = c("first.name", "LastName"),
  fix_acronyms = TRUE,
  fix_camel = FALSE
)

Arguments

name_list

List of column names.

fix_camel

Change camel case to underscores before processing.

Examples

set_std_col_names(c("first.name", "LastName"))
[1] "first_name" "lastname"
set_std_col_names(c("first.name", "LastName"), fix_camel = T)
[1] "first_name" "last_name"

uva-bi-sdad/dc.utils documentation built on Aug. 1, 2022, 1:45 a.m.