[R] incomplete final line

Duncan Murdoch murdoch at stats.uwo.ca
Wed Sep 3 18:23:38 CEST 2008


On 03/09/2008 11:00 AM, catherine workman wrote:
> Hello,
> 
> I am trying to read in an Excel file that I saved as a .csv so I can analyze
> my dissertation data! I am getting really frustrated because this is what I
> keep getting:
> In read.table(file = file, header = header, sep = sep, quote = quote,  :
>   incomplete final line found by readTableHeader on 'month.csv'
> 
> can anyone offer some help? Thanks a lot! catherine

On Unix, text files (and .csv is just a structured text file) should 
alway have an end of line marker on every line.  In Windows, many 
programs (including Excel, it appears) produce text files where the last 
line often doesn't have an end of line marker.

This message is usally a warning, not an error.  On Unix it would 
indicate something may have gone wrong in producing the file, but on 
Windows it's usually not a problem -- but you should inspect the data to 
make sure it all got read properly.

If this was an error, then you won't have read anything.  In that case 
you need to give us more information to go on, i.e. make your 
"month.csv" file (or a subset of it) available, and tell us the exact 
command that you ran.

Duncan Murdoch



More information about the R-help mailing list