Getting stock news data from google in R [closed]

岁酱吖の 提交于 2019-12-07 17:23:10

问题


I can use quantmod to get historical data and close-to-realtime quotes for stocks. I can also use quantmod to get financials data from Google. Are there any existing R packages that would let me grab Google's news feed for a given stock?

If not, is there a package for reading and parsing RSS feeds in R?


回答1:


Sure, RSS is after all XML, so use the XML package.




回答2:


There's also a (not yet on CRAN) package that does some of the nitty gritty of parsing RSS feeds (and Atom) for you - nothing fancy, just some of the basic cleaning, normalization between the RSS and Atom spec, etc.

You can grab it from https://github.com/noahhl/r-does-rss

(full disclosure, I wrote it)




回答3:


I wrote my own function to do this, using XML and xts. I posted it as a question on SO, because I think it could be improved.



来源:https://stackoverflow.com/questions/5749252/getting-stock-news-data-from-google-in-r

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!