I believe this should work
d <- read.table("foo.csv", header=T, sep=",", comment="T")
although its spitting back a warning... this used to work for me.
Noah Silverman wrote
>
> Hi,
>
> I have a CSV file that is formatted well, except that the last line is a
> "summary" not is CSV format.
On 13/02/12 13:05, Noah Silverman wrote:
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=
: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf Of Henrique
> Dallazuanna
> Sent: Sunday, February 12, 2012 4:27 PM
> To: Noah Silverman
> Cc: r-help
> Subject: Re: [R] Reading in csv with footer
>
> This works for me:
>
> Lines <- &
Nice one!!!
Tanks.
--
Noah Silverman
UCLA Department of Statistics
8208 Math Sciences Building
Los Angeles, CA 90095
On Feb 12, 2012, at 4:26 PM, Henrique Dallazuanna wrote:
> This works for me:
>
> Lines <- "label_1, label_2, label_3
> 1,2,3
> 3,2,4
> 2,3,4
> Total Rows: 3"
>
> d <- head(rea
Thanks Steve,
Your suggestion about nrows seems like the easiest.
Thanks!
--
Noah Silverman
UCLA Department of Statistics
8208 Math Sciences Building
Los Angeles, CA 90095
On Feb 12, 2012, at 4:23 PM, Steve Lianoglou wrote:
> Hi,
>
> On Sun, Feb 12, 2012 at 7:05 PM, Noah Silverman
> wrote:
This works for me:
Lines <- "label_1, label_2, label_3
1,2,3
3,2,4
2,3,4
Total Rows: 3"
d <- head(read.csv(textConnection(Lines)), -1)
closeAllConnections()
On Sun, Feb 12, 2012 at 10:05 PM, Noah Silverman wrote:
> Hi,
>
> I have a CSV file that is formatted well, except that the last line is a
Hi,
On Sun, Feb 12, 2012 at 7:05 PM, Noah Silverman wrote:
> 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
7 matches
Mail list logo