How to Convert “space” into “ ” with R

后端 未结 4 1827
礼貌的吻别
礼貌的吻别 2021-01-18 16:18

Referring the title, I\'m figuring how to convert space between words to be %20 .

For example,

> y <- \"I Love You\"

How to

4条回答
  •  春和景丽
    2021-01-18 16:51

    The function curlEscape() from the package RCurl gets the job done.

    library('RCurl')
    y <- "I love you"
    curlEscape(urls=y)
    [1] "I%20love%20you"
    

提交回复
热议问题