Sarah,

That is correct - thanks a lot for this to everyone who replied

Paolo

On 15 June 2011 16:03, Sarah Goslee <sarah.gos...@gmail.com> wrote:

> You need to add row.names=FALSE to your write.table() statement.
>
> This and other useful options are documented in the help. And you'll
> notice that that first column of row names appears in your R output as
> well.
>
> Sarah
>
> On Wed, Jun 15, 2011 at 10:51 AM, Paolo Rossi
> <statmailingli...@googlemail.com> wrote:
> > I have a dataframe object having the following structure
> >
> >  FinalOutput[1:3,]
> >     GasDays 2011-03-31 2010-09-30 2010-10-31 2010-11-30 2010-12-31
> > 2011-01-31 2011-02-28
> > 1 2006-10-01  217303553  221205033  222824639  217016511  216093460
> > 216477468  216834021
> > 2 2006-10-02  231158527  234565250  236004109  231467851  230100639
> > 230079907  230734064
> > 3 2006-10-03  282062314  285427832  286372163  282532055  280930498
> > 281155966  281124614
> > After using
> > write.table(FinalOutput, paste("ModelComparison.csv", sep = ''), sep =
> ',')
> >
> > the out put I get on the csv is
> >
> >
> >
> >  GasDays 31/03/2011 30/09/2010     31/10/2010      30/11/2010
> >  31/12/2010            31/01/2011       28/02/2011         31/03/2011
> > 1              01/10/2006 217303553.3 221205032.6
> > 222824638.7       217016510.8
> > 216093460       216477467.9       216834021            217303553.3
> > 2              02/10/2006 231158527.1 234565249.7
> >  236004108.7       231467850.7       230100639.1       230079907.4
> > 230734064.4       231158527.1
> > 3              03/10/2006 282062314.5 285427831.6
> > 286372163       282532055.2       280930497.7
> > 281155966         281124613.8       282062314.5
> >
> >
> > so essentially one column  full  of 1,2,3, ... is added to the file when
> > saving it.
> >
> > Can someone pelase help me to get rid of it?
> >
> > Thanks
> >
> > Paolo
> >
> --
> Sarah Goslee
> http://www.functionaldiversity.org
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to