str_clean: Clean string

View source: R/strings.R

str_cleanR Documentation

Clean string

Description

A simple wrapper str_replace_all() with sensible defaults.

Usage

str_clean(
  string,
  underscores = T,
  spacing_dots = T,
  end_dots = T,
  all_dots = F,
  multi_dots = T
)

Arguments

string

(chr scalar) A string to clean.

underscores

(log scalar) Whether to clean underscores. Default=T.

spacing_dots

(log scalar) Whether to clean spacing underscores. Default=T.

end_dots

(log scalar) Whether to clean dots at the end of the string. Default=T.

all_dots

(log scalar) Whether to clean all dots. Default=F.

multi_dots

(log scalar) Whether to reduce multiple dots in a row to a single dot. Default=T.

Examples

str_clean(colnames(iris))

Deleetdk/kirkegaard documentation built on April 1, 2024, 2:23 a.m.