Re: [R] Problems downloading file
Hi Pete, I have got the same problem on Windows Vista, but I found a solution from the docu: setInternet2(use = TRUE) seems to be necessary before download.file to make R be able to use some special dll from internet explorer. Ulrich -- View this message in context: http://r.789695.n4.nabble.com/Problems-downloading-file-tp4435186p4476052.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
Re: [R] Problems downloading file
It might be a local network or OS issue: this works fine for me on my personal Mac download.file(url = "http://ir.eia.gov/wpsr/psw09.xls";, destfile = "~/herewego.xls", mode = "wb") Someone with more Windows knowledge may have to help you out, but often using IE settings (activated by the setInternet2 command if I recall correctly) is a good first move. Michael On Thu, Mar 1, 2012 at 9:47 AM, Pete Brecknock wrote: > I am running the following line to download data from the US Energy > Information Administration. This function has worked successfully for me in > the past but yesterday gave the error/warning messages below. > > If I simply type "http://ir.eia.gov/wpsr/psw09.xls"; (no quotes) into a > browser, the file is available to download. > > I am running R 2.13.0 on Windows XP. > > # Download File Attempt > download.file("http://ir.eia.gov/wpsr/psw09.xls","c:\\temp\\psw09.xls",mode="wb";) > > # Error & Warning Messages > trying URL 'http://ir.eia.gov/wpsr/psw09.xls' > Error in download.file("http://ir.eia.gov/wpsr/psw09.xls";, > "c:\\temp\\psw09.xls", : > cannot open URL 'http://ir.eia.gov/wpsr/psw09.xls' > In addition: Warning message: > In download.file("http://ir.eia.gov/wpsr/psw09.xls";, "c:\\temp\\psw09.xls", > : > InternetOpenUrl failed: 'The operation timed out' > > Thanks for any insights. > > Pete Brecknock > > > -- > View this message in context: > http://r.789695.n4.nabble.com/Problems-downloading-file-tp4435186p4435186.html > Sent from the R help mailing list archive at Nabble.com. > > __ > R-help@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. __ R-help@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.
[R] Problems downloading file
I am running the following line to download data from the US Energy Information Administration. This function has worked successfully for me in the past but yesterday gave the error/warning messages below. If I simply type "http://ir.eia.gov/wpsr/psw09.xls"; (no quotes) into a browser, the file is available to download. I am running R 2.13.0 on Windows XP. # Download File Attempt download.file("http://ir.eia.gov/wpsr/psw09.xls","c:\\temp\\psw09.xls",mode="wb";) # Error & Warning Messages trying URL 'http://ir.eia.gov/wpsr/psw09.xls' Error in download.file("http://ir.eia.gov/wpsr/psw09.xls";, "c:\\temp\\psw09.xls", : cannot open URL 'http://ir.eia.gov/wpsr/psw09.xls' In addition: Warning message: In download.file("http://ir.eia.gov/wpsr/psw09.xls";, "c:\\temp\\psw09.xls", : InternetOpenUrl failed: 'The operation timed out' Thanks for any insights. Pete Brecknock -- View this message in context: http://r.789695.n4.nabble.com/Problems-downloading-file-tp4435186p4435186.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.