Here is a query string that I use to plug into a form:
team,site,week,day,date,o:team,line,points,o:points@season=2011
and here is the resulting string that is passed to the website:
team%2Csite%2Cweek%2Cday%2Cdate%2Co%3Ateam%2Cline%2Cpoints%2Co%3Apoints%40season%3D2011
I know that R is a very powerful language. Are there any functions that would encode this for me? I figure I could write a function to mimic this output, but I didn't want to reinvent the wheel.
Any help will be greatly appreciated.
curlEscape
in package RCurl
does what you want:
> library(RCurl)
Loading required package: bitops
> curlEscape("team,site,week,day,date,o:team,line,points,o:points@season=2011")
[1] "team%2Csite%2Cweek%2Cday%2Cdate%2Co%3Ateam%2Cline%2Cpoints%2Co%3Apoints%40season%3D2011"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With