Re: [R] how can I convert .csv format to matrix???

2009-11-03 Thread bbslover
thank you for your help,it is a good way. Steven Kang wrote: can try matrix.x - as.matrix(x) On Mon, Nov 2, 2009 at 8:38 PM, bbslover dlu...@yeah.net wrote: In my disk C:/ have a a.csv file, I want to read it to R, importantly, when I use x=read.csv(C:/a.csv) ,the x format is

[R] how can I convert .csv format to matrix???

2009-11-02 Thread bbslover
In my disk C:/ have a a.csv file, I want to read it to R, importantly, when I use x=read.csv(C:/a.csv) ,the x format is data.frame, I want to it to become matrix format, how can I do it ? thank you! -- View this message in context:

Re: [R] how can I convert .csv format to matrix???

2009-11-02 Thread Steven Kang
can try matrix.x - as.matrix(x) On Mon, Nov 2, 2009 at 8:38 PM, bbslover dlu...@yeah.net wrote: In my disk C:/ have a a.csv file, I want to read it to R, importantly, when I use x=read.csv(C:/a.csv) ,the x format is data.frame, I want to it to become matrix format, how can I do it

Re: [R] how can I convert .csv format to matrix???

2009-11-02 Thread Dieter Menne
bbslover wrote: In my disk C:/ have a a.csv file, I want to read it to R, importantly, when I use x=read.csv(C:/a.csv) ,the x format is data.frame, I want to it to become matrix format, how can I do it ? as.matrix should do the job; if it does not (second example), you probably