[R] a question on write.table
Antonio Silva
aolinto.lst at gmail.com
Mon Sep 28 22:23:59 CEST 2015
Thanks Giorgio, David and Rui
With the suggestions my problem was solved in different ways.
Best regards
Antonio
2015-09-28 15:52 GMT-03:00 Giorgio Garziano <giorgio.garziano em ericsson.com>:
> Try this:
>
> X<-c("A","B","C","D","E")
> Y<-c(0,1,2,3,4)
>
> for (i in 0:3) {
> Y<-Y+i
> data<-data.frame(X,Y)
> fe.flag <- file.exists("test.csv")
> write.table(data, "test.csv", row.names = FALSE, col.names = !fe.flag,
> sep=";", append = fe.flag)
> }
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help em r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
>
--
Antônio Olinto Ávila da Silva
Biólogo / Oceanógrafo
Instituto de Pesca (Fisheries Institute)
São Paulo, Brasil
[[alternative HTML version deleted]]
More information about the R-help
mailing list