[R] R and REST API's

Greg Hirson ghirson at ucdavis.edu
Mon Sep 28 17:39:00 CEST 2009


Gary,

Echoing Barry's suggestion of Omegahat packages, take a look at RCurl - 
http://www.omegahat.org/RCurl/
It has a function, getForm, which passes GET form parameters as a list 
to curl. I used it and the XML package in writing
RLastFM (http://cran.r-project.org/web/packages/RLastFM/index.html) 
which implements this for last.fm. With a few XPath queries (in the XML) 
package, you can format the data into a data frame.

Greg

Gary Lewis wrote:
> Hi - Many organizations now make their data available as XML via a
> REST web service architecture. Is there any R package or facility to
> access this type of data directly (eg, to make the HTTP GET request
> and have the downloaded data put into an R data  frame)?
>
> I used several R search sites to look for an answer, but came up with
> very little. Any help would be appreciated.
>
> Thanks very much.
>
> Gary Lewis
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>   

-- 
Greg Hirson
ghirson at ucdavis.edu

Graduate Student
Agricultural and Environmental Chemistry

1106 Robert Mondavi Institute North
One Shields Avenue
Davis, CA 95616




More information about the R-help mailing list