[R] Reading data with blank elements

From: Ahamarshan jn <ashgene_at_yahoo.co.in>
Date: Fri 21 Jul 2006 - 22:43:03 EST

 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                                         






I am using R to perform a correlation, but I am getting an error while trying to read the data as



Error in scan (file = file, what = what, sep = sep, quote = quote, dec = dec, :

        line 1919 did not have 13 elements Execution halted "  

The error looks as though there is a problem with the last element being not read when it is blank. I could introduce terms like "na" to the blank elements but I donot want to do that because this will hinder my future analysis.

Can some one suggest me a solution to overcome this problem while reading the data? , or is there something that I have missed to make the data readable.

Thank you in advance,

PS: The data was imported from a experiment and saved in excel sheet as a *.csv and then used.

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri Jul 21 22:47:48 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 22 Jul 2006 - 04:15:44 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.