Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
タイトルを参考に、単語間のスペースを %20 に変換する方法を考えています。
例えば、
> y <- "I Love You"
作り方y = I%20Love%20You
y = I%20Love%20You
> y [1] "I%20Love%20You"
どうもありがとう。
別のオプションは次のようになりますURLencode():
URLencode()
y <- "I love you" URLencode(y) [1] "I%20love%20you"
gsub()1つのオプションです:
gsub()
R> gsub(pattern = " ", replacement = "%20", x = y) [1] "I%20Love%20You"