Patch occupancy plotting with new version Rangeshifter 1.1.0 #48
Replies: 3 comments 1 reply
-
|
Hi Ella, I would need a minimal working example to have a closer look at the issue.
This seems not like a RangeShiftR related issue as some object seem to be missing.
This message can be ignored. This is due to an empty raster placeholder when stacking the occupance probabilities. I will try to get rid of the warning message with the next RS release. |
Beta Was this translation helpful? Give feedback.
-
Hi, thank you for looking into this. I have used the script from the tutorials and I did not have any issues before the update. It lets me plot the occupancy probability/time using the basic plot function but doesn't work when I add extra symbology for example as above and also this which gives the same error message:
|
Beta Was this translation helpful? Give feedback.
-
|
Hi Ella, I assume you refer to the code of tutorial 2? Looking at the code snippets you provided, it seems that you are still using older code, which included some raster dependencies (rasterVis). With the raster package not being supported anymore, we have switched to the terra package already a while ago. This concerns not only the handling of raster object within RangeShitR but also plotting in the tutorials. I reran the tutorial 2 with the newest RangeShiftR version (1.1.1) and was able to replicate the results. So I don't think that this is an issue within RangeShiftR but more with the analysis you are doing after running the simulation. I would suggest that you again have a look at the new tutorials and how we plot the landscapes without the rasterVis package. Another point could be that spaces within your raster file names might cause some issues. (but this is only a guess). So overall, I feel that the issue is not directly related to the new RangeShiftR version, but might be caused by the rasterVis package, Without having a full minimal working example, with which I could reproduce your error, I unfortunately cannot provide any additional help. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am trying to plot the patch occupancy probability and occupancy time over my land cover in greyscale symbology. This usually works in the previous version however I am having issues with plotting it with the land cover background.
This is the script and the error message:
bg <- function(main=NULL){ rasterVis::levelplot(raster(landsc), margin=F, scales=list(draw=FALSE), colorkey=F, col.regions = rev(colorRampPalette(brewer.pal(3, "Greys"))(10)), main=main) } col.key <- function(mycol, at, space='top',pos=0.95, height=0.6, width=1) { key <- draw.colorkey( list(space=space, at=at, height=height, width=width, col=mycol) ) key$framevp$y <- unit(pos, "npc") return(key)} bg() + rasterVis::levelplot(col$map_occ_prob, margin=F, scales=list(draw=FALSE), at=seq(0,1,length=11), col.regions=mycol_occprob(11)) grid.draw(col.key(mycol_occprob(11),at=seq(0,1,length=11)))=
Error in eval(i, data, env) : object 'Final.habitat.patch.V6' not foundWhen I initially run the ColonisationSats I get this message, suggesting it doesn't like one of the layers:
> col <- ColonisationStats(master_parameter, dirpath, maps = T) Warning message: [rast] the first raster was empty and was ignoredDo you know what the issue could be?
Beta Was this translation helpful? Give feedback.
All reactions