[R] Appending to gzfile does not work in R 2.11.0

Hana Sevcikova hana at cs.washington.edu
Mon May 17 22:32:03 CEST 2010


In R 2.11.0, the following code that appends data using gzfile in 'ab' 
mode doesn't work anymore (it worked in the previous versions):

con <- gzfile('myfile.gz', open='wb')
write.table(c(1,2,3), file=con)
close(con)
con <- gzfile('myfile.gz', open='ab')
write.table(c(4,5), file=con)
close(con)

The file contains only entries from the first call (1,2,3).

I have tried it on Windows as well as on Mac OS platforms - the same 
behavior.

Is there anything I'm doing wrong?

Thanks,

Hana Sevcikova



More information about the R-help mailing list