comma_spacer function

Ensure Space After Comma

Ensure Space After Comma

Adds a space after a comma as strip and many other functions may consider a comma separated string as one word (i.e., "one,two,three" becomes "onetwothree" rather than "one two three").

comma_spacer(text.var)

Arguments

  • text.var: The text variable.

Returns

Returns a vector of strings with commas that have a space after them.

Examples

## Not run: x <- c("the, dog,went", "I,like,it", "where are you", NA, "why", ",", ",f") comma_spacer(x) ## End(Not run)
  • Maintainer: Tyler Rinker
  • License: GPL-2
  • Last published: 2023-05-11