[R] read zipped files

Heberto Ghezzo heberto.ghezzo at mcgill.ca
Mon Feb 4 18:41:57 CET 2002


I received several answer to my querry re reading zipped files,
R.Gentleman, Liaw Andy, BD Ripley,J Holtman, A.Matt, and others,
sorry
if I missed your names.
a- use pipe to run external unzip to a file and read from there
b- use gzfile() to open directly a gzipped file
c- use zip.file.extract()
solution b works like a charm, unfortunately it open gzipped files
and
not zipped files, would it be possible in a future release to add
a
zipfile() function?
solution c. There is a problem here a) the help says it can be
changed
at any moment b) it does not work in some platforms.
Well it does not work in a Win98 machine with R1.4.0 The work
inside
zip.file.extract() is done by:
rc <- .Internal(int.unzip(file.path(path,zipname),topic,tempdir))
it return rc = 0 which I assume means OK
but I can not find the unzipped file anywhere or using rc as file
pointer.
Can somebody tell me how to access the unzipped file, i.e."topic"
How
do I write txt <- readLines(pfile,n=2), what do I put instead of
pfile?
As always thanks to those who responded to my first querry
--
R. Heberto Ghezzo Ph.D.
Meakins-Christie Labs
McGill University
Montreal  -  Canada

-------------- next part --------------
An embedded message was scrubbed...
From: Mail Delivery Subsystem <MAILER-DAEMON at stat.math.ethz.ch>
Subject: Returned mail: User unknown
Date: Mon, 04 Feb 2002 15:20:33 +0100 (MET)
Size: 4054
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20020204/898fcb43/attachment.mht


More information about the R-help mailing list