Referring the title, I\'m figuring how to convert space between words to be %20 .
For example,
> y <- \"I Love You\"
How to
The function curlEscape() from the package RCurl gets the job done.
curlEscape()
RCurl
library('RCurl') y <- "I love you" curlEscape(urls=y) [1] "I%20love%20you"