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 [[alternative HTML version deleted]]
From each R-help message's footer: PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. And this is really required, since we cannot guess what you did, what the precise message is (ERROR or WARNING), and how the file/data look like. Uwe Ligges 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 > > [[alternative HTML version deleted]] > > ______________________________________________ > 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.
try read.csv which is the same if you are using read.table with the sep="," . is the final line complete? You are welcome to send me the data and I can try and figur it out, but this is not a lot to go on. On Wed, Sep 3, 2008 at 11:00 AM, catherine workman <ccworkman at gmail.com> 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 > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. >-- Stephen Sefick Research Scientist Southeastern Natural Sciences Academy Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis
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! catherineOn 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