library(sp)
library(raster)
LUT=data.frame(map=c(1,2,3,4,5,6),new=c(100,20,30,40,60,80))
data("suitabinput")
newmap=raster(suitabinput["depthcodes"])
newmap$depth=reclassifyMap((newmap$depthcodes),LUT)
spplot(newmap$depth)
Run the code above in your browser using DataLab