Re: [R] Error reading a table

From: jim holtman <jholtman_at_gmail.com>
Date: Fri, 27 Jun 2008 12:27:04 -0400

Try

read.table(....,fill=TRUE)

On Fri, Jun 27, 2008 at 12:00 PM, <naw3_at_duke.edu> wrote:
> Hi,
>
> I get the following error when I try to read in a CSV file:
>
>> Path<-read.table('MetaCycSample2.csv',sep=',', header=FALSE)
> Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, :
> line 17 did not have 5 elements
>
> Some of the rows have more columns than others. Also when I try the read.csv
> command, the very last column, which only has one cell with a value, doesn't
> get read, so that last cell is lost.
>
> How can I fix this?
>
> Thanks,
> -Nina
>
> ______________________________________________
> R-help_at_r-project.org 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.
>

-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?

______________________________________________
R-help_at_r-project.org 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 27 Jun 2008 - 17:20:44 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 27 Jun 2008 - 17:31:14 GMT.

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

list of date sections of archive