Re: [R] write.csv writing the "index"

From: Henrique Dallazuanna <wwwhsd_at_gmail.com>
Date: Fri, 08 Aug 2008 15:26:57 -0300

write.table(..., row.names = FALSE)

On Fri, Aug 8, 2008 at 3:23 PM, <rkevinburton_at_charter.net> wrote:
> I have a simple command to export a data.frame:
>
> write.csv(output, "TotalPredicted2008.dat")
>
> The structure of the data.frame can be seen with:
>
>> head(output)
> DayOfYear Sales
> 1 1 1429
> 2 2 3952
> 3 3 3049
> 4 4 2844
> 5 5 2219
> 6 6 2340
>
> But it seems that the index is getting written out to the file. The first few lines look like:
>
> "","DayOfYear","Sales"
> "1",1,1429
> "2",2,3952
> "3",3,3049
> "4",4,2844
> "5",5,2219
> "6",6,2340
>
> I would like to not have this extra column in the output. Can it be filtered out?
>
> Thank you.
>
> Kevin
>
> ______________________________________________
> 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.
>

-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

______________________________________________
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 08 Aug 2008 - 18:29:25 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 08 Aug 2008 - 18:33:25 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