sylvainschmitt / SSDM

Stacked Species Distribution Modelling R package
Other
41 stars 17 forks source link

using SSDM #68

Closed lwind18 closed 4 years ago

lwind18 commented 4 years ago

When I load the occurrence data, the error came up with: "subscript out of bounds" But I double checked the occurrence data, it is inside of the raster data. Does anyone have the similar question? Or how do I fix this? Thanks.

sylvainschmitt commented 4 years ago

You'll need to be clearer, could you provide a summary of both your occurrences and your environmental layers with summary ? And have you checked that you correctly set parameters of the load_occ function ?

lwind18 commented 4 years ago

I figured it out, though I don't know why. This time, I remove the "Spcol", and it worked. Besides, I also tried summary, but I get the error: summary(clienv) Error in apply(object@data@values, 2, quantile, na.rm = TRUE) : no slot of name "data" for this object of class "RasterStack" If I just write code clienv, it gives me the information about environmental variables. I also noticed that sometimes, it gives me: clienv class : RasterStack nlayers : 0

lwind18 commented 4 years ago

My occurrence data has 13000 records. Today, I tried a small sample (1000 records) and it works till ensemble_modelling. But, when I am doing stack_modelling, it gives me error:

Ensemble models creation

Opening clusters, 1 cores Exporting environment to clusters Error in checkForRemoteErrors(val) : one node produced an error: comparison of these types is not implemented I am so sorry to bother you and thank you for your time.

sylvainschmitt commented 4 years ago

Hey Sylvain, Because using "stacking_modelling" still has problem, I am trying to using "stack" to get the richness map. It is working, but I don't know how to save the result. I can use plot to see the map, but if I want to save the map as GeoTIFF format, how could I do? Do you have code to support this? I found there is "savePlot", is this one can be used for saving map? Thank you for you time and this package is really helpful! (#69 closed for duplication)

stacking_modelling doesn't have a problem itself, you need to figure out what's happening in your specific case with your dataset. Anyway, if stacking is working great for you. And please before asking a question relative to the use of SSDM read the article, the manual, and the vignette. The save.stack function you are looking for is described in each of them.