normalize_strings: Automated normalization of string formats

Description Usage Arguments Value

View source: R/curate_df.R

Description

I commonly use this to clean abnormally formatted df variable names.

Usage

1
normalize_strings(x, case = "upper", length = 20)

Arguments

x

Character vector.

case

Character value "upper" or "lower"

length

integer length which we will trim longer strings to. If non-alphanumeric characters exist (e.g., dashes or spaces) we will trim +/-5 characters of this length to retain intact words.

Value

character vector


dkrozelle/toolboxR documentation built on Sept. 22, 2018, 11:45 p.m.