Simulation Runs on Rstudio cloud but fails when run locally #26
-
I am experiencing a challenge with simulating dispersal using rangeshiftR I would like some assistance to understand this. I set up a simulation in "Rstudio Cloud" and the experiment runs successfully and returns the "results" I need. However, the exact experiment fails with the following error when I run it in "Rstudio locally": Run Simulation(s) with seed 13976 ... Error reading landscape 0 - aborting This is the link to the "Rstudio cloud project" for assistance. I am working with : R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics" and: I would like to be able to run the experiment on my local machine as well without the error. Thankyou |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi there, raster::writeRaster(round(AllData2a*100), format="ascii", filename = "Inputs/climate_suitabilitya", NAflag = -9, overwrite = T, bylayer = T, datatype = "INT2U") Best, |
Beta Was this translation helpful? Give feedback.
Hi there,
When loading and writing the climate suitability to file you use probabilities ranging 0-1. However, RangeShiftR expects percentage value 0-100%. Thus, you code in line 44 should look like this:
raster::writeRaster(round(AllData2a*100), format="ascii", filename = "Inputs/climate_suitabilitya", NAflag = -9, overwrite = T, bylayer = T, datatype = "INT2U")
Best,
Damaris