Replace values of a SpatRaster
Replace values of a SpatRaster. These are convenience functions for smaller objects only.
SpatRaster
values, replace
r <- rast(ncol=5, nrow=5, xmin=0, xmax=5, ymin=0, ymax=5) r[] <- 1:25 r[1,] <- 5 r[,2] <- 10 r[r>10] <- NA
Spatial Data Analysis
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.