Re: [R] write.table and read.table commands

2012-08-27 Thread David Winsemius
On Aug 27, 2012, at 10:04 PM, R. Michael Weylandt > wrote: It's because read.table returns a data frame, not a matrix. You can coerce to a matrix with as.matrix() but you might loose information if your variables are of different classes. Michael On Aug 27, 2012, at 7:07 PM, Cheryl Johns

Re: [R] write.table and read.table commands

2012-08-27 Thread R. Michael Weylandt
It's because read.table returns a data frame, not a matrix. You can coerce to a matrix with as.matrix() but you might loose information if your variables are of different classes. Michael On Aug 27, 2012, at 7:07 PM, Cheryl Johnson wrote: > Greetings, > > When I try to use the write.table c

[R] write.table and read.table commands

2012-08-27 Thread Cheryl Johnson
Greetings, When I try to use the write.table command to save a matrix as a file and then open the file with read.table, if I try to take the mean of the entire matrix, instead each column of the matrix has its mean calculated. I have copied and pasted an example of my code below. When I try to mak