Re: [R] gzfile with multiple entries in the archive

2006-11-18 Thread Duncan Temple Lang
ader <- header[nchar(header)>0][c(1,5)] > close(zz) > if(any(is.na(header))) { > break; > } > listOfFiles[[countFiles]] <- header[1] > zz <- file(tmp, 'rb') >

Re: [R] gzfile with multiple entries in the archive

2006-11-17 Thread John James
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

Re: [R] gzfile with multiple entries in the archive

2006-11-15 Thread Greg Snow
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

Re: [R] gzfile with multiple entries in the archive

2006-11-14 Thread Prof Brian Ripley
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

[R] gzfile with multiple entries in the archive

2006-11-14 Thread John James
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