I am replicating the R code for a published paper about climate change that uses prism package to access and visualize data from the Oregon State PRISM project.
This code stopped running with a error message of:
utils::unzip(outFile, exdir = ofolder) : 'exdir' does not exist
However, there is no unzipping in the code, except the one already defined in the prism package. This code uses two functions in the prism package: 1) get_prism_dailys, and 2) prism_set_dl_dir.
I have already read this page about error of "exdir does not exist". But this code from the published paper does not have an unzipping command.
Can someone help me with this? Code:
lapply(c("tmin","tmax"), function(var){
print(var)
# Set directory to write daily files
prism_set_dl_dir(paste0(dir$prism,"/daily/",var))
# Download files
get_prism_dailys(type = var, minDate = "1981-01-01", maxDate = "2020-12-31", keepZip=FALSE)
})
})