[R-sig-Geo] reading PRISM data from ftp [OT]
Andy Bunn
abunn at whrc.org
Thu Jun 22 18:54:49 CEST 2006
> 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/20
> 00-2009/us_tdmean_2004.01.gz',tmp)
> trying URL
> 'ftp://ocs.oce.orst.edu/pub/prism/us/grids/tdmean/2000-2009/us_tdm
> ean_2004.01.gz'
> Error in
> download.file("ftp://ocs.oce.orst.edu/pub/prism/us/grids/tdmean/20
> 00-2009/us_tdmean_2004.01.gz",
> :
> cannot open URL
> 'ftp://ocs.oce.orst.edu/pub/prism/us/grids/tdmean/2000-2009/us_tdm
> ean_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/20
> 00-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_tdme
> an_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...
This works with method 'wget' under windows - thanks. -AB
>
> Barry
>
>
>
More information about the R-sig-Geo
mailing list