macroecology / mapast

15 stars 3 forks source link

pm_getmap error #2

Open willgearty opened 7 years ago

willgearty commented 7 years ago

pm_getmap(interval="Cretaceous")(the example in the documentation) results in the following error and warning:

Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection
In addition: Warning message:
In readChar(con, 5L, useBytes = TRUE) :
  cannot open compressed file 'Data/Cretaceous.rda', probable reason 'No such file or directory'

It looks like the function is trying to load an actual file (load(paste("Data/", interval, ".rda", sep = ""))), but the data is already in the environment since it is loaded with the package. In this case, assign("shape", get("Cretaceous")) should be sufficient.

ghost commented 6 years ago

Hi Willgearty, I got the same problem. then I tried what you suggested:

shape <- assign("shape", get("Cretaceous")) shape class : SpatialPolygonsDataFrame features : 86 extent : -180, 180, -88.8737, 83.6951 (xmin, xmax, ymin, ymax) coord. ref. : NA variables : 13 names : PLATEID1, GPGIM_TYPE, TYPE, FROMAGE, TOAGE, NAME, DESCR, FEATURE_ID, PLATEID2, L_PLATE, R_PLATE, RECON_METH, SPREAD_ASY min values : 0, gpml:UnclassifiedFeature, NA, 0, 0, NA, NA, GPlates-052973e4-ed8e-43bf-85b4-aa178e2242a8, 0, 0, 0, NA, 0 max values : 0, gpml:UnclassifiedFeature, NA, 0, 0, NA, NA, GPlates-ffbfeec0-bf61-4769-ac12-bf43ec206a14, 0, 0, 0, NA, 0

but it doesn't come out with any shape of map or plot.. I need Oligocene, Miocene epoch maps of the world...but don't get the example map. Thank you! Best,

ghost commented 6 years ago

Got it. Here is:

shape <- assign("shape", get("Oligocene")) shape plot(shape) Thank you!