1

I'd like to try the K prototypes for my data, but when I use the code:

kpres <- kproto(#name of data", "number of cluster", lambda = xx) 

I get the following mistake:

Error in Ops.data.frame(x[, j], rep(protos[i, j], nrows)) : list of length 3994 not meaningful

Does somebody know how to fix it?

Thanks!!

Martin Schmelzer
  • 23,283
  • 6
  • 73
  • 98
Maria
  • 11
  • 2
  • See [mcve] for info on how to ask a question. – G. Grothendieck Apr 27 '17 at 20:52
  • It will be easier to help you if you provide a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). It doesn't look like you are calling the function like it appears in the documentation at all. Are you following some guide? – MrFlick Apr 27 '17 at 20:53
  • Sure, my guide is the following link https://cran.r-project.org/web/packages/clustMixType/clustMixType.pdf – Maria Apr 27 '17 at 21:02

1 Answers1

3

You need to convert the data into a dataframe first and then pass it to kproto.

For example:

data<- as.data.frame(data)
kpres <- kproto(data, "number of cluster", lambda = xx) 
GeralexGR
  • 2,973
  • 6
  • 24
  • 33
Burks
  • 31
  • 5