[R] Problems downloading file

Pete Brecknock Peter.Brecknock at bp.com
Thu Mar 1 15:47:43 CET 2012


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.



More information about the R-help mailing list