[R] write.csv + appending output (FILE I/O)

From: Sachin J <sachinj.2006_at_yahoo.com>
Date: Fri 19 May 2006 - 00:36:09 EST


Hi,    

  How can I write the output to an excel (csv) file without printing row names (i.e without breaks). Here is my code:    

  library(    

  fn <- function()
{

 q <- c(1,2,3)
 write.csv(q,"C:/Temp/op.xls", append = TRUE, row.names = FALSE,quote = FALSE) }    

  # Function Call
  for(i in 1:3)
{

  fn()
}    

  Present Output :

              x 1 2 3 x 1 2 3 x 1 2 3    

  Desired output:
  1
  2
  3
  1
  2
  3
  1
  2
  3    

  Also it displays following warning messages.    

  Warning messages:

1: appending column names to file in: write.table(q, "C:/Temp/op.xls",  
2: appending column names to file in: write.table(q, "C:/Temp/op.xls",  
3: appending column names to file in: write.table(q, "C:/Temp/op.xls",  

  I am using R2.2.1 windows version. I tried using write.xls from "marray" package but no success.    

  Thanx in advance.    

  Sachin


        [[alternative HTML version deleted]]



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 Received on Fri May 19 00:50:10 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 Fri 19 May 2006 - 04:10:14 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.