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

From: Uwe Ligges <ligges_at_statistik.tu-dortmund.de>
Date: Mon, 18 Apr 2011 18:22:39 +0200

On 17.04.2011 19:29, Haillie wrote:
> 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

... but ?ordrating tells you it must be a matrix rather than a data.frame.

Uwe Ligges

> 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.
>
> Sincerely,
> Haillie
>
> --
> 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
> 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.



R-help_at_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. Received on Mon 18 Apr 2011 - 16:28:39 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:40: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