Closed amandasalvi closed 6 years ago
It works fine on this end. Perhaps the Worldclim server was temporarily down, can you check again?
I tried again and this time got the error: Error in get_wcpath() : Set path for WorldClim rasters first, e.g. options(worldclimpath = 'c:/worldclim')
So, input >options(worldclimpath = 'c:/worldclim'), and tried again.
Then got the same error in downloading as I did before
Very strange. What happens if you put the URL http://biogeo.ucdavis.edu/data/worldclim/v2.0/tif/base/wc2.0_10m_tmin.zip
in a browser?
Hmm when I do that, a zip file successfully downloads to my computer
I figured out the problem. Rather than using setwd() to set where the zip file would be downloaded, I had to do options(worldclimpath = ... )
Also, I needed to install the package rgdal
Now it works! Thanks!
I'm running into a downloading error when running climate_presence():
INFO [2018-02-13 14:28:46] ALA returned 5328 records for Eucalyptus regnans in 0.4 sec. INFO [2018-02-13 14:28:52] Rasterized 5328 occurrences into 216 cells
Error in download.file(fn, fn_to, mode = "wb", quiet = TRUE) : cannot download all files In addition: Warning messages: 1: In download.file(fn, fn_to, mode = "wb", quiet = TRUE) : URL http://biogeo.ucdavis.edu/data/worldclim/v2.0/tif/base/wc2.0_10m_tmin.zip: cannot open destfile 'worldclim/wc2.0_10m_tmin.zip', reason 'No such file or directory' 2: In download.file(fn, fn_to, mode = "wb", quiet = TRUE) : downloaded length 0 != reported length 33428903