Re: [R] how to unzip files in R

2012-02-01 Thread Benno Pütz
Depending on what you want to do with that file, there may be no need to uncompress … read.table(), e.g., works fine with the compressed version. Benno On Feb 1, 2012, at 2:04 AM, Luke Miller wrote: Try the bzfile() function instead of unz(). You'll find that you're taken to the

Re: [R] how to unzip files in R

2012-02-01 Thread ql16717
Hi Henrik, That is exactly what I was looking for. I worked great. Many thanks. By the way it doesn't seem to be able to do batch mode. I guess I will have to iterate through. But thats ok. John On 1/31/12, Henrik Bengtsson h...@biostat.ucsf.edu wrote: I may be wrong, but I don't think unz()

[R] how to unzip files in R

2012-01-31 Thread ql16717
Hi, I have downloaded a bunch of bz2 files. I wonder if R will be able to unzip them in a batch mode or even one at a time? I was looking at the unz function. But it didn't work well. Say I have a bz2 file in H:/Temp/65502805_532.pair.bz2. Anyone has any suggestion? thanks John

Re: [R] how to unzip files in R

2012-01-31 Thread Henrik Bengtsson
I may be wrong, but I don't think unz() handles bz2 files - only zip files. See bunzip2() of the R.utils package (which utilizes bzfile connections). /Henrik On Tue, Jan 31, 2012 at 2:34 PM, ql16717 ql16...@gmail.com wrote: Hi, I have downloaded a bunch of bz2 files. I wonder if R will be

Re: [R] how to unzip files in R

2012-01-31 Thread Luke Miller
Try the bzfile() function instead of unz(). You'll find that you're taken to the same help page for both of those functions. ?bzfile On Tue, Jan 31, 2012 at 2:34 PM, ql16717 ql16...@gmail.com wrote: Hi, I have downloaded a bunch of bz2 files. I wonder if R will be able to unzip them in a