tm.plugin.sentiment issue. Error: could not find function “DMetaData”

我是研究僧i 提交于 2019-12-08 03:41:53

问题


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)

This is the error I get:

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

回答1:


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/issues/1

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")


来源:https://stackoverflow.com/questions/24612080/tm-plugin-sentiment-issue-error-could-not-find-function-dmetadata

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