0

Has anyone seen this error before? -

Error in colnames<-(tmp, value = 1:59) : 'names' attribute [59] must be the same length as the vector [0]

If yes, how can I fix with it?

Suhaib Janjua
  • 3,538
  • 16
  • 59
  • 73
  • Please show a reproducible example. You can check similar error http://stackoverflow.com/questions/10566473/names-attribute-must-be-the-same-length-as-the-vector – akrun Apr 19 '15 at 07:15
  • Another question with a similar error: http://stats.stackexchange.com/questions/51148/unable-to-provide-random-parameter-with-mlogit – Pj_ Apr 19 '15 at 07:56

1 Answers1

1

This error would occur, if you try to assign column names to an empty data.frame:

d <- data.frame()
colnames(d) <- 1:59
Roland
  • 127,288
  • 10
  • 191
  • 288