开发者

R interface to wolfram alpha [closed]

开发者 https://www.devze.com 2023-03-19 16:51 出处:网络
Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 1 year ago.

Improve this question

The wolfram alpha web interface suffers (like Mr. Wolfr开发者_开发百科am) from massive hubris. There is some very useful data behind that interface; however, and I'd like to access it programmatically. There appears to be a python library to do this. Is anyone aware of an R package for wolfram alpha? How would I go start building it, if it does not exist?


In terms of putting together such a package yourself, there are a few pointers that might be helpful:

First is to check out the API for Wolfram Alpha: http://products.wolframalpha.com/api/

There you'll see the various URL calls that one can make and what the return formats would be.

Next, check out some packages that are doing similar things with other APIs. There are some examples at www.omegahat.org (particularly under the "REST-related packages" subsection, but there are others strewn about), as well as multiple packages on CRAN such as package "infochimps" by Drew Conway, RLastFM by Greg Hirson, as well as the "twitteR" and "RStackExchange" packages by me.

Looking at how these packages interact with their respective web APIs should get you started - it's a fairly straightforward process. The basic strategy is to build up the URL you need for a call w/ the parameters that you want and then to use R to send that to the server & retrieve the output (typically either in JSON or XML) and then parse that result back into an R object.


Perhaps calling that package from R: http://rpython.r-forge.r-project.org/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号