[R] converting data.frame into a numeric ( integer) form

From: Haillie <nal_at_princeton.edu>
Date: Sun, 17 Apr 2011 10:29:56 -0700 (PDT)

Hi Everyone,

I am relatively new to R and would appreciate your help on this problem that I encontered this morning.
When running an ordinal IRT model using Ratings package on R, I keep getting this error message.

ord.out<-ordrating(UNORD, burnin = 1000, mcmc = 40,000, thin = 400, tune = 1, verbose = 1000, seed = NA)

Error in as.vector(as.integer(Y)) :
  (list) object cannot be coerced to type 'integer'

UNORD is my data.frame and it is in the form of delimited CSV file without either row or column name.
According to the help page on Ordinal ratings, Y should be "a Matrix of data to be analyzed. Entries must be integers from 1; : : : ;C or NA where C is the number of ordinal categories. Items are on the rows and subjects are on the columns." I am confused because my data.frame only contains numerica values of 1,2,3, and NA. I checked and my NAs were all numeric.

Any help or advice you could provide on this issue would be greatly appreciated. Thank you very much.
I would like to thank all the R experts navigating this forum in advance.


View this message in context: http://r.789695.n4.nabble.com/converting-data-frame-into-a-numeric-integer-form-tp3455811p3455811.html
Sent from the R help mailing list archive at Nabble.com.

R-help_at_r-project.org mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sun 17 Apr 2011 - 21:10:52 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 18 Apr 2011 - 16:30:31 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive