add_comma_space: Ensure Space After Comma

Description Usage Arguments Value Examples

View source: R/add_comma_space.R

Description

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").

Usage

1

Arguments

x

The text variable.

Value

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

Examples

1
2
3
4
5
## Not run: 
x <- c("the,  dog,went", "I,like,it", "where are you", NA, "why", ",", ",f")
add_comma_space(x)

## End(Not run)

Example output

[1] "the,  dog, went" "I, like, it"     "where are you"   NA               
[5] "why"             ","               ", f"            

textclean documentation built on May 2, 2019, 7:22 a.m.