R/nr-core.R
nr_replace.Rd
Replace colours in a native raster
nr_replace(nr, old, new)
nativeRaster
Vector of old colours
Vector of replacement colours
Original nativeRaster modified in-place
nr <- nr_new(10, 10, 'hotpink') nr_replace(nr, 'hotpink', 'grey80') plot(nr)