[R] Reading data with blank elements

2006-07-21 Thread Ahamarshan jn
Hi, I have a dataset saved in *.csv format, that contains 13 columns (the first column being the title name and the rest experiments) and about 2500 rows. Not all columns in the row have data in it i.e for eg

Re: [R] Reading data with blank elements

2006-07-21 Thread jim holtman
Use x - count.fields('datafile.csv',sep=',') on your file. This will tell you the number of columns that R thinks is one each line. Then do: table(x) to see if all the lines have the same number of columns. If not, then find the lines which don't: which(x != legal.length) and then look at

Re: [R] Reading data with blank elements

2006-07-21 Thread Gabor Grothendieck
See if this works: read.csv(datafile.csv, row.names = 1, fill = TRUE) On 7/21/06, Ahamarshan jn [EMAIL PROTECTED] wrote: Hi, I have a dataset saved in *.csv format, that contains 13 columns (the first column being the title name and the rest experiments) and about 2500 rows. Not all

Re: [R] Reading data with blank elements

2006-07-21 Thread Philipp Pagel
Hi! On Fri, Jul 21, 2006 at 05:43:03AM -0700, Ahamarshan jn wrote: I have a dataset saved in *.csv format, that contains [...] BS00,-0.084,0.0136,-0.1569,-0.6484,1.103,1.7859,0.40287,0.5368,0.08461,-0.1935,-0.147974,0.30685 BS01,0.491270283,0.875826172,,

Re: [R] Reading data with blank elements

2006-07-21 Thread Marc Schwartz (via MN)
On Fri, 2006-07-21 at 05:43 -0700, Ahamarshan jn wrote: Hi, I have a dataset saved in *.csv format, that contains 13 columns (the first column being the title name and the rest experiments) and about 2500 rows. Not all columns in the row have data in it i.e for eg