ader <- header[nchar(header)>0][c(1,5)]
> close(zz)
> if(any(is.na(header))) {
> break;
> }
> listOfFiles[[countFiles]] <- header[1]
> zz <- file(tmp, 'rb')
>
readUpTo <- 512 + nextBlockStartsAt + convert(header[2])
nextBlockStartsAt <- (readUpTo%/%512 + 1) * 512
close(zz)
}
listOfFiles
}
-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Sent: 14 November 2006 15
Healthcare
[EMAIL PROTECTED]
(801) 408-8111
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John James
Sent: Tuesday, November 14, 2006 5:07 AM
To: r-help@stat.math.ethz.ch
Subject: [R] gzfile with multiple entries in the archive
If I open a tgz archive
On Tue, 14 Nov 2006, John James wrote:
> If I open a tgz archive with gzfile and then parse it using readLines I miss
> the initial line of each member of the archive - and also the name of the
> file although the archive otherwise complete (but useless!).
You can use a gzfile connection to read
If I open a tgz archive with gzfile and then parse it using readLines I miss
the initial line of each member of the archive - and also the name of the
file although the archive otherwise complete (but useless!).
Is there any way within R to extract both the list of files in a tgz archive
and to