Re: [R] convert the contents of a date.frame to a matrix

2009-05-31 Thread David Winsemius
On May 31, 2009, at 12:03 PM, David Winsemius wrote: On May 31, 2009, at 10:49 AM, Hongyuan Cao wrote: x = read.table("hongyuan_5_30_forsafe.txt", sep = "\t") > x = read.table("/Users/davidwinsemius/Downloads/ hongyuan_5_30_forsafe.txt", sep = "\t") > str(x) 'data.frame': 7131 obs. of

Re: [R] convert the contents of a date.frame to a matrix

2009-05-31 Thread David Winsemius
On May 31, 2009, at 10:49 AM, Hongyuan Cao wrote: x = read.table("hongyuan_5_30_forsafe.txt", sep = "\t") > x = read.table("/Users/davidwinsemius/Downloads/ hongyuan_5_30_forsafe.txt", sep = "\t") > str(x) 'data.frame': 7131 obs. of 74 variables: $ V1 : Factor w/ 7131 levels "","A28102_

Re: [R] convert the contents of a date.frame to a matrix

2009-05-31 Thread David Winsemius
Unable to reproduce: > ?data.matrix > x <- read.table(textConnection(" ALL ALL.1 ALL.2 ALL.3 ALL.4 ALL.5 ALL.6 ALL.7 ALL.8 ALL.9 ALL.10 ALL.11 + 2 -214 -139 -76 -135 -106 -138 -72 -413 5 -88 -165-67 + 3 -153 -73 -49 -114 -125 -85 -144 -260 -127 -105 -155

[R] convert the contents of a date.frame to a matrix

2009-05-31 Thread Hongyuan Cao
Dear R user, I am trying to convert the contents of a date.frame to a matrix. Since there are negative values in the date.frame, when I use data.matrix(x, rownames.force = NA), the resulting matrix is not the same as the original one. Basically I think R treats the numbers in the date.frame as cha