For instance I have
a=c("Jack and Jill,went up the, hill,to,fetch a pail,of, water")
and I'm trying to do is add space after comma if and only if the comma is followed by an alphabet such that my Output would look like this
"Jack and Jill, went up the, hill, to, fetch a pail, of, water"
This is what I have tried
gsub("/,(?![ ])/, ", " ",a)
but doesn't give me desired result. Any help would be much appreciated. THANKS