Suppose I have a string like
s = "PleaseAddSpacesBetweenTheseWords"
How to use gsub in R add space between words so I get
"Please Add Spaces Between These Words"
I should do something like
gsub("[az][AZ]", ???, s)
What am I setting for ???. Also, I find the regex documentation for R confusing, so references or entries to regexes in R would be much appreciated.
source share