2

我收到此警告消息。我使用这些数据:

https://github.com/kbenoit/quanteda/tree/master/data/data_char_inaugural.RData

RStudio 版本:版本 1.0.136 – © 2009-2016 RStudio, Inc.

 library(quanteda)
 uk2010immigCorpus <- corpus(data_char_ukimmig2010, docvars = data.frame(party = names(data_char_ukimmig2010)),metacorpus = list(notes = "Immigration-related sections of 2010 UK party manifestos"))
 mydfm <- dfm(uk2010immigCorpus, remove = c("will", stopwords("english")),removePunct = TRUE)


 Error in validObject(.Object) : invalid class “dfmSparse” object: superclass "replValueSp" not defined in the environment of the object's class

QUANTEDA有什么问题?

谢谢!大神

4

1 回答 1

8

我通过安装 Matrix 库然后重新安装 quanteda 解决了这个问题,最后我重新启动了 R,现在 dfm 可以工作了。

install.packages("Matrix")
install.packages("quanteda")
于 2017-02-03T15:44:35.687 回答