Excuse me...
when i re-read my e-mail i saw my mistake!
I use a "TermDocumentMatrix" instead of a "DocumentTermMatrix"...

On 11 Ott, 22:45, Dario Solari <dario.sol...@gmail.com> wrote:
> I try to fit a LDA model to a TermDocumentMatrix with the topicmodels
> package...
> but R says:
>
> > Error in LDA(TDM, k = k, method = "Gibbs", control = list(seed = SEED,  :
> > x is of class “TermDocumentMatrix”“simple_triplet_matrix”
> > class(TDM)
> > [1] "TermDocumentMatrix"    "simple_triplet_matrix"
>
> I try to use a matrix... but don't work:
>
> > MAT <- as.matrix(TDM)
> > Error in LDA(MAT, k = k, method = "Gibbs", control = list(seed = SEED,  :
> > x is of class “matrix”
>
> The help say is correct to use a DocumentTermMatrix:
>
> > Arguments
> > x   Object of class "DocumentTermMatrix"
>
> Can anyone help me?
> Thanks
>
> ______________________________________________
> r-h...@r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to