powered by
Replace values of a SpatRaster. These are convenience functions for smaller objects only. For larger rasters see link{classify}
link{classify}
SpatRaster
link{classify}, values, replace
# NOT RUN { r <- rast(ncols=5, nrows=5, xmin=0, xmax=5, ymin=0, ymax=5) r[] <- 1:25 r[1,] <- 5 r[,2] <- 10 r[r>10] <- NA # }
Run the code above in your browser using DataLab