Message-ID: <35AA55B0-60BD-4D66-83B6-A6E6412F6D9A@ucla.edu>
Date: 2012-02-13T00:05:09Z
From: Noah Silverman
Subject: Reading in csv with footer
Hi,
I have a CSV file that is formatted well, except that the last line is a "summary" not is CSV format.
Toy example:
label_1, label_2, label_3
1,2,3
3,2,4
2,3,4
Total Rows: 3
When I try to import this into R with: d <- read.table("foo.csv", header=T, sep=",")
It fails to import properly because of the last line.
Currently, I have a shell script that strips the last line from the file, then it imports to R cleanly. I don't like this extra layer of processing.
Is there a way to import something like this cleanly in R.
Thanks!
--
Noah