reSpace: Replace any space or spaces with a single new.space character...

Description Usage Arguments Value Examples

Description

Replace any space or spaces with a single new.space character apiece

Usage

1
2
.reSpace(x, new.space = "_", reduce.spaces = FALSE,
  old.space = "[[:punct:]|[:blank:]]")

Arguments

x

string[s] to be respaced

new.space

character[s] with which to replace spaces

reduce.spaces

logical. Reduce multiple consecutive spaces to a single one?

old.space

regular expression defining space; default includes punctuation, space, and tab

Value

The respaced character string

Examples

1
loadflex:::.reSpace("this  \t old *!$?# mandolin", reduce.spaces=TRUE) # returns "this_old_mandolin"

McDowellLab/loadflex documentation built on May 8, 2019, 9:48 a.m.