Re: [R] Characters To Matrix

2009-03-03 Thread jim holtman
Why aren't you using 'read.table'? On Tue, Mar 3, 2009 at 3:47 AM, Bob Roberts wrote: > Hi, >   I have a data set that I read in using readLines, but R classes it as a > character string. The data set has multiple columns and rows, but I only want > the first 2 columns in the form of a matrix.

Re: [R] Characters To Matrix

2009-03-03 Thread Dieter Menne
Bob Roberts yahoo.com> writes: >I have a data set that I read in using readLines, but R classes it as a character string. The data set has > multiple columns and rows, but I only want the first 2 columns in the form of a matrix. Thanks for the help. data(CO2) str(CO2) col2 = as.matrix(CO2[,1

[R] Characters To Matrix

2009-03-03 Thread Bob Roberts
Hi, I have a data set that I read in using readLines, but R classes it as a character string. The data set has multiple columns and rows, but I only want the first 2 columns in the form of a matrix. Thanks for the help. [[alternative HTML version deleted]] __