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