[R] odd behavior of data.matrix()

2011-08-18 Thread Alexander Schwall
Hi R community, I have been trying to figure out why R is reversing the order of rows after I run data.matrix() Here is my data: df-structure(list(itmID = c(1L, 2L, 1L, 2L, 1L, 2L), variable = structure(c(1L, 1L, 2L, 2L, 3L, 3L), .Label = c(3, 2, 1), class = factor), value = c(0.7, 0.52,

Re: [R] odd behavior of data.matrix()

2011-08-18 Thread Brian Diggs
On 8/18/2011 1:40 PM, Alexander Schwall wrote: Hi R community, I have been trying to figure out why R is reversing the order of rows after I run data.matrix() Here is my data: df-structure(list(itmID = c(1L, 2L, 1L, 2L, 1L, 2L), variable = structure(c(1L, 1L, 2L, 2L, 3L, 3L), .Label = c(3,