Problem about using functions in RCurl to download a zipped file
0
0
Entering edit mode
@sean-davis-490
Last seen 4 months ago
United States
On Wed, Nov 12, 2008 at 12:28 AM, LiGang <luzifer.li@gmail.com> wrote: > Dear list, > > How to use functions in RCurl to download a zipped file such as the one > listed in the following URL: > > > http://bioconductor.org/packages/2.3/bioc/bin/windows/contrib/2.8/AB array_1.10.0.zip > > Following code does not work: > > getURL(" > > http://bioconductor.org/packages/2.3/bioc/bin/windows/contrib/2.8/AB array_1.10.0.zip > ") > > > nor : > > getURL(" > > http://bioconductor.org/packages/2.3/bioc/bin/windows/contrib/2.8/AB array_1.10.0.zip > ",file="target.zip") > > > P.S. > > How should the 'file' option in getURL function be specified? > You'll probably want to read the help for getURL. It does not have a "file" argument. It is for reading URLs directly. In this case (judging from what you want to do), I would suggest using download.file() instead. If you really need to use RCurl, then you might need to look at the "write" argument, which would probably allow you to write things to disk as they come in. But, you will need to write the handler to have it do this--specifying a file name will not work, if that isn't obvious from the help. You would have to be careful with this, though, as .zip files are binary. Sean [[alternative HTML version deleted]]
• 591 views
ADD COMMENT

Login before adding your answer.

Traffic: 331 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6