I would greatly appreciate some example of correct usage of function unz. I have to download and uncompress the following web compressef file: ftp://ftp.sanger.ac.uk/pub/mirbase/targets/v5/arch.v5.txt.homo_sapiens.zip I tried the following command that does not work: Targets.rec <- readLines(zz <- unz("ftp://ftp.sanger.ac.uk/pub/mirbase/targets/v5/arch.v5.txt.homo_sapiens.zip")) Thank you in advance, Maura tutti i telefonini TIM! [[alternative HTML version deleted]]
On 28-Jul-09 12:15:33, mauede at alice.it wrote:> I would greatly appreciate some example of correct usage of > function unz. > I have to download and uncompress the following web compressef file: > ftp://ftp.sanger.ac.uk/pub/mirbase/targets/v5/arch.v5.txt.homo_sapiens.z > ip > > I tried the following command that does not work: > > Targets.rec <- readLines(zz <- > unz("ftp://ftp.sanger.ac.uk/pub/mirbase/targets/v5/arch.v5.txt.homo_sapi > ens.zip")) > > Thank you in advance, > MauraMaura, unz() is insisting that you give the "filename" argument, which, according to '?unz', is: filename: a filename within a zip file. This means that you would first need to know the name[s] of the file[s] archived in the .zip file, as far as I can see. So, in that case, a first step would be to download the .zip file anyway, to your local system, and then, in whatever way is appropriate for your system ("unzip -l ...." in Linux), find out what the files in it are called. But once you have got that far, you may prefer to handle the .zip file outside of R ... Hoping this helps, Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk> Fax-to-email: +44 (0)870 094 0861 Date: 28-Jul-09 Time: 13:50:45 ------------------------------ XFMail ------------------------------
Also see ?zip.unpack On Tue, Jul 28, 2009 at 8:15 AM, <mauede at alice.it> wrote:> I would greatly appreciate some example of correct usage of function unz. > I have to download and ?uncompress the following web compressef file: > ftp://ftp.sanger.ac.uk/pub/mirbase/targets/v5/arch.v5.txt.homo_sapiens.zip > > I tried the following command that does not work: > > Targets.rec <- readLines(zz <- unz("ftp://ftp.sanger.ac.uk/pub/mirbase/targets/v5/arch.v5.txt.homo_sapiens.zip")) > > Thank you in advance, > Maura > > > > tutti i telefonini TIM! > > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org 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. >