error in readRDS

Hi all,

I'm trying to use ggplot and to add the base map using readRDS, but it doesn't work. Could you please help me to see how to import the base map? Thanks very much.

This is my code

borders <- readRDS(url("https://biogeo.ucdavis.edu/data/gadm3.6/Rsf/gadm36_IRN_0_sf.rds"))
And here is the error message:

Error in readRDS(url("https://biogeo.ucdavis.edu/data/gadm3.6/Rsf/gadm36_IRN_0_sf.rds")) : 
  cannot open the connection
In addition: Warning message:
In readRDS(url("https://biogeo.ucdavis.edu/data/gadm3.6/Rsf/gadm36_IRN_0_sf.rds")) :
  InternetOpenUrl failed: 'The server returned an invalid or unrecognized response'

i was trying to use curl package ike this

myfilemem <- tempfile("myfile") 
curl::curl_download("https://biogeo.ucdavis.edu/data/gadm3.6/Rsf/gadm36_IRN_0_sf.rds",
                    destfile = myfilemem)
readRDS(myfilemem)

my problem is that the server is timing out and not responding. I get that same timeout behaviour when I click for it in my browser...

Could any expert help to solve the two similar problems? Thanks a lot.

This file is accessible for me from Australia at this time:
9:01 am, Saturday, 25 April 2020, Coordinated Universal Time (UTC).

I suspect the server was 'down' when you tried.
HTH

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.