r - Overcoming "Error: unexpected input" in RCurl -


i trying , failing use rcurl automate process of fetching spreadsheet web site, china labour bulletin's strike map.

here url spreadsheet options set i'd them:

http://strikemap.clb.org.hk/strikes/api.v4/export?fromyear=2011&frommonth=1&toyear=2015&tomonth=6&_lang=en

here code i'm using:

library(rcurl) temp <- tempfile() temp <- getform("http://strikemap.clb.org.hk/strikes/api.v4/export",   fromyear="2011", frommonth="1",    toyear="2015", tomonth="6",   _lang="en") 

and here error message in response:

error: unexpected input in: "     toyear=2015, tomonth=6,      _" 

any suggestions on how work?

try enclosing _lang backtick.

temp <- getform("http://strikemap.clb.org.hk/strikes/api.v4/export",                 fromyear="2011",                 frommonth="1",                 toyear="2015",                 tomonth="6",                 `_lang`="en") 

i think r has trouble on argument starting underscore. seems have worked me.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -