I want to reclassify raster r1 in the following form:
library(raster)r1
- all the values that are larger than r2 to be 1
- all the values that are less than r3 to be 0
- all the rest of the values to be equal to r4
library(raster)r1