P <- nmf(tdm, rank=2)
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘nmf’ for signature ‘"TermDocumentMatrix", "numeric", "missing"’
I've seen people use nmf like this, i'm not sure why it isn't working for me.
library(NMF) textes <- tm_map(textes, stripWhitespace) textes <- tm_map(textes, tolower) textes <- tm_map(textes, removePunctuation) textes <- tm_map(textes, removeNumbers) textes <- tm_map(textes, removeWords, stopwords("english"))
tdm <- TermDocumentMatrix(textes)
P <- nmf(tdm, rank=2) Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘nmf’ for signature ‘"TermDocumentMatrix", "numeric", "missing"’
I've seen people use nmf like this, i'm not sure why it isn't working for me.