Re: [R] Export data

From: John Kane <jrkrideau_at_yahoo.ca>
Date: Mon 11 Sep 2006 - 10:29:22 GMT

?write.table >>

             append = TRUE ?

> Hi there,
>
> I would like to write a data output. In first time,
> a data frame (called
> "res") is written in a file *csv such as:
>
> A B C # names of data
> 1.5 4.5 7 # values
>
> So I use "write.table" which prints "res" to a file
> "file.csv"
>
write.table(res,file="file.csv",sep="",row.names=TRUE,col.names=TRUE,eol
>
> = "\n")
>
> After, I would like to append other data to the same
> file,
>
> A B C
> 1.5 4.5 7
> 3 6 9 # appended data
>
> I use then the same function but with different
> arguments:
>
write.table(res,file="file.csv",append=TRUE,sep="",row.names=TRUE,col.names=FALSE,eol
>
> = "\n")
>
> Actually, it doesn't work, the file is overwritten
> by the new one.
>
> I got something like that:
> A B C
> 3 6 9
>
> Coul you help me? Thank you in advance
>
> Kind regards,
> Marie-NoŽlle
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.
>



R-help@stat.math.ethz.ch 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 Mon Sep 11 20:35:05 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 11 Sep 2006 - 11:30:04 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.