Skip to content
Prev 304252 / 398503 Next

write.matrix.csr data conversion

Most likely when 'y' is converted to a dataframe (not sure what the
function 'write.matrix.csr' does since you did not say where you got
it), '0' and '1' are converted to factors which probably show up as 1
and 2 in the file.  Here is a quick example:
x
 0  1
12  8
'table' int [1:2(1d)] 12 8
 - attr(*, "dimnames")=List of 1
  ..$ x: chr [1:2] "0" "1"
'data.frame':   2 obs. of  2 variables:
 $ x   : Factor w/ 2 levels "0","1": 1 2  #<<- norice the 1 & 2 as the
values of the factors '0' & '1'
 $ Freq: int  12 8

        
On Mon, Aug 27, 2012 at 2:47 PM, Sam Steingold <sds at gnu.org> wrote: