# NOT RUN {
set.seed(0)
r.top <- raster::raster(ncols = 10, nrows = 10)
r.bot <- raster::raster(ncols = 10, nrows = 10)
r.top[] <- rnorm(raster::ncell(r.top), mean = 12)
r.bot[] <- rnorm(raster::ncell(r.bot), mean = 10)
summary(r.top - r.bot)
r <- BumpDisconnectCells(raster::stack(r.top, r.bot), min.overlap = 0.1)
raster::plot(r.bot + r)
# }
Run the code above in your browser using DataLab