tm.plugin.sentiment 问题.错误:找不到函数“DMetaData" [英] tm.plugin.sentiment issue. Error: could not find function "DMetaData"

查看:33
本文介绍了tm.plugin.sentiment 问题.错误:找不到函数“DMetaData"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了无数次以不同的方式在 R 中运行 tm.plugin.sentiment 包中的 score() 函数,但我不断收到相同的错误.这是一个示例代码:

I have tried countless times in different ways to run the score() function in the tm.plugin.sentiment package in R but I keep getting the same error. This is a sample code:

    library(tm.plugin.webmining)
    library(tm.plugin.sentiment)
    cor <- WebCorpus(GoogleFinanceSource("NASDAQ:MSFT"))
    tm_tag_score <- tm_term_score
    corpus <- score(cor)

这是我得到的错误:

    Error in score(cor) : could not find function "DMetaData"

推荐答案

看起来是由于从 tm 包中删除了 DMetaData 函数引起的.参考github上的这个issue:

Looks like it's caused by the removal of the DMetaData function from the tm package. Refer to this issue on github:

https://github.com/mannau/tm.plugin.sentiment/问题/1

使用 devtools 从 github 升级到最新版本的 tm.plugin.sentiment 为我解决了这个问题.

upgrading to the latest version of tm.plugin.sentiment from github using devtools fixed this for me.

library(devtools)
install_github("mannau/tm.plugin.sentiment")

这篇关于tm.plugin.sentiment 问题.错误:找不到函数“DMetaData"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆