I have data for species distribution modelling of two different species. I need to plot the predicted distributions of the two species in the same raster plot to be able to find the areas where they occur in allopatry(alone) and sympatry(together).
How do I plot such a map in R?
My data is a point data used with other environmental for the species distribution model. I have done the distribution modelling and have the predicted raster layer for the two species in two different raster plots. But what I want is to plot the two rasters in the same plot, such that I could show areas where the two species occur together(sympatry), where they occur differently (allopatry) and where they do not occur at all.
both = (r1 + r2)==2
will create a raster where the sum of the two rastersr1
andr2
is 2. Is that the sort of things you want to do?