R tm,plugin.touction软件包:如何绘制情绪趋势?

R tm,plugin.touction软件包:如何绘制情绪趋势?,r,sentiment-analysis,tm,R,Sentiment Analysis,Tm,我的目标: 选择一个股票行情器,绘制烛台图和股票趋势图。 访问同一股票行情器的新闻,并绘制情绪分析趋势图,以便直观地关联趋势 library(XML) library(tm) library(tm.plugin.webmining) library(tm.plugin.sentiment) library(NLP) library(openNLP) library(slam) library(tm.plugin.tags) library(SnowballC) #Get stock ti

我的目标:
选择一个股票行情器,绘制烛台图和股票趋势图。 访问同一股票行情器的新闻,并绘制情绪分析趋势图,以便直观地关联趋势

library(XML)
library(tm)
library(tm.plugin.webmining)
library(tm.plugin.sentiment)  
library(NLP)
library(openNLP)
library(slam)
library(tm.plugin.tags)
library(SnowballC) 

#Get stock time series for selected stock
getSymbols("XYZ", src="yahoo")
chartSeries(XYZ, subset='last 3 months')
addBBands() ### This plots last 3 months of stock trending chart
#Get news for the specific stock
XYZNews = WebCorpus(GoogleFinanceSource("XYZ"))
text.corpus = score(XYZNews)
meta(text.corpus)
现在,我的目标是保存时间序列中的所有新闻文章,并根据每日新闻语料库绘制特定股票的情绪、极性等,以直观地将其与QuantMod绘制的股票趋势图进行比较

问题:我偶然发现了ChartCondition{tm.plugin.Condition},但不知道如何使用它。 图表情绪(xts,前缀=“SEMNT”, 其XTS对象至少包含“Close”和“Score”字段


也找不到任何示例。感谢社区的帮助。

虽然您的标题中包含程序包名称,但建议您在代码中也包含
调用。您是对的。以下是程序包:library(XML)library(tm)library(tm.plugin.webmining)library(tm.plugin.感性)图书馆(NLP)图书馆(openNLP)图书馆(slam)图书馆(tm.plugin.tags)图书馆(SnowballC)感谢泰勒对其进行了重新格式化。我是这个社区的新手,仍然习惯于格式。