[R-sig-Geo] reading PRISM data from ftp [OT]
Barry Rowlingson
B.Rowlingson at lancaster.ac.uk
Thu Jun 22 18:10:41 CEST 2006
Andy Bunn wrote:
Well, you dont say in what way it doesn't work. I get:
>
download.file('ftp://ocs.oce.orst.edu/pub/prism/us/grids/tdmean/2000-2009/us_tdmean_2004.01.gz',tmp)
trying URL
'ftp://ocs.oce.orst.edu/pub/prism/us/grids/tdmean/2000-2009/us_tdmean_2004.01.gz'
Error in
download.file("ftp://ocs.oce.orst.edu/pub/prism/us/grids/tdmean/2000-2009/us_tdmean_2004.01.gz",
:
cannot open URL
'ftp://ocs.oce.orst.edu/pub/prism/us/grids/tdmean/2000-2009/us_tdmean_2004.01.gz'
However, if you add 'method="wget"' (and are running on a Unix box
with wget installed) it works for me:
>
download.file('ftp://ocs.oce.orst.edu/pub/prism/us/grids/tdmean/2000-2009/us_tdmean_2004.01.gz',tmp,method="wget")
--17:05:41--
ftp://ocs.oce.orst.edu/pub/prism/us/grids/tdmean/2000-2009/us_tdmean_2004.01.gz
=> `/tmp/RtmpHcpXlj/file643c9869'
[wget stuff]
100%[======================================================================>]
832,851 319.71K/s ETA 00:00
17:05:46 (319.71 KB/s) - `/tmp/RtmpHcpXlj/file643c9869' saved [832851]
So I'm guessing its a problem with R's internal FTP client. Maybe it
doesnt like underscores or minus signs... Speculation...
Barry
More information about the R-sig-Geo
mailing list