Hi, It's unlikely that anyone will be able to see your problem without a reproducible example.
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example Are you using the mclust package? That would be the first thing we need to know. Then, have you worked through the examples in ?predict.Mclust, and do you understand them? Then, what do your data look like? str() and such are useful, but the best option is to use dput() to create a reproducible subset, or to reproduce your problem using one of the built-in datasets in R, as is done in the above documentation examples. Sarah On Tue, Dec 10, 2013 at 6:41 AM, Welma Pereira <welma.pere...@gmail.com> wrote: > Hi, > > I am trying to use mclust to cluster some data (train_pca_10), I get the > clusters, but when I try to use the model to predict new data (test1) I get > this error > > > > mClust2 <- Mclust(train_pca_10,G=2) > pred<-predict.Mclust(mClust2,test1) > > Error in if (warn) warning(WARNING) : argument is of length zero > > Can anyone see the problem here? > > Thanks, > Pereira. > -- Sarah Goslee http://www.functionaldiversity.org ______________________________________________ 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.