clean_string: Cleans a provided string

View source: R/clean_string.R

clean_stringR Documentation

Cleans a provided string

Description

Cleans a provided string with specified parameters, used primarily as a helper for cleaning column names.

Usage

clean_string(
  object,
  sep = ".",
  names = FALSE,
  numlead = FALSE,
  case = c("title", "lower", "upper", "sentence")
)

Arguments

object

Input, either vector or named object (specify names = TRUE)

sep

What character(s) should be used to separate words within cells

names

Specify whether the cleaning should be done on the names of a provided object rather than the object itself

numlead

Allows for numbers to remain as the lead character in a string, default is FALSE

case

What case should be returned? Allows for title, lower, upper, and sentence

Value

Vector or object as the same type received, but with text changes.


imraugh/qualitema documentation built on Feb. 8, 2025, 3:16 p.m.