Skip to content
Prev 156903 / 398506 Next

gsub difficulty

Any of these will replace every dot with a space:

x <- "a.b.c"
gsub("\\.", " ", x)
gsub("[.]", " ", x)
gsub(".", " ", x, fixed = TRUE)
chartr(".", " ", x)

See ?regex for more info on regular expressions.

On Tue, Sep 23, 2008 at 1:16 PM, Charles Annis, P.E.
<Charles.Annis at statisticalengineering.com> wrote: