我收到此警告消息。我使用这些数据:
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怎么了?
谢谢!
je下
最佳答案
我通过安装矩阵库解决了问题,然后重新安装了Quanteda,最后我重新启动了R,现在dfm可以了。
install.packages("Matrix")
install.packages("quanteda")