gzfile() can handle a single file in *.gz. If you want to read one of
the files in a bunch of files, you may as well extract them first
using "tar -zxvf yourarchive.tar.gz" (sounds like a stupid solution),
or if you only want to use R, system() could help, e.g. system("tar
-zxvf yourarchive.tar.gz"). You didn't tell us sessionInfo(), so I'm
not sure whether you are able to use the "tar" command.Regards, Yihui -- Yihui Xie <[email protected]> Phone: 515-294-6609 Web: http://yihui.name Department of Statistics, Iowa State University 3211 Snedecor Hall, Ames, IA 2009/9/27 Uwe Ligges <[email protected]>: > > > Peng Yu wrote: >> >> Hi, >> >> Suppose that there are multiple files in a .gz file. > > Well, the extension .gz regularly stand for a (single) gzip compressed file. > Tyoically you will find more tan one file in a tar archive or a zip > compressed archive. For the latter see ?unz. > > Uwe Ligges > > > >> How to open only >> one file in it? I don't find such options in the help. >> >> Regards, >> Peng >> ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

