如何在R中从Web读取多个栅格文件?

时间:2020-02-11 08:17:53

标签: html r raster netcdf4

我想从服务器上以R显示(不下载到我的计算机中).nc文件,并且可以免费访问Internet。我在下面使用了此代码,但是找不到很好的命令来读取所有文件。 有人可以帮我改善我的代码!

url <- "https://www.ncei.noaa.gov/data/avhrr-land-normalized-difference-vegetation-index/access/1981/"
f="*.nc"
if (!file.exists(f)) download.file(file.path(url, f), f, mode="wb")



trying URL 'https://www.ncei.noaa.gov/data/avhrr-land-normalized-difference-vegetation-index/access/1981//*.nc'
Error in download.file(file.path(url, f), f, mode = "wb") : 
  cannot open URL 'https://www.ncei.noaa.gov/data/avhrr-land-normalized-difference-vegetation-index/access/1981//*.nc'
In addition: Warning message:
In download.file(file.path(url, f), f, mode = "wb") :
  cannot open URL 'https://www.ncei.noaa.gov/data/avhrr-land-normalized-difference-vegetation-index/access/1981//*.nc': HTTP status was '404 Not Found'

0 个答案:

没有答案