I wanted to display in R (without downloading to my computer) .nc files from a server with free access on the internet. I used this code below, but I can't find a good command to read all the files. Can someone help me to improve my code please!
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'