[R] gzfile() produces large files

Uwe Ligges ligges at statistik.uni-dortmund.de
Wed Jun 27 15:41:59 CEST 2001


I observed some strange results playing around with gzfile() [R-1.3.0,
WinNT 4.0]:

At first

  x <- 1:1000
  write(x, file = "c:/temp.txt")

results in a file of about 4 kB. But

  my.con <- gzfile("c:/temp.gz", open = "w")
  write(x, file = my.con)
  close(my.con)

results in a file of about 16 kB.

I expected a reduction of the size. Anyone who can tell me what went
wrong?

Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list