My raster has nonsensical values (based on combination of multiple rasters in previous steps), with attributes maintained (again, due to combination of rasters in previous steps), see below for sample attribute table
I want to reclassify the Value column conditional on the 01_SHP_FINALNLCD attribute i.e. specifically, I want to reclassify all pixels with 01_SHP_FINALNLCD= 52 to 1, 01_SHP_FINALNLCD =41 to 2 etc.
I tried the following in R
How can I do this in R or arcpy? Here is the
trial<-raster[raster$01_SHP_FINALNLCD== 52 | raster$01_SHP_FINALNLCD==41] Error in .local(x, ...) : invalid layer names
Here is the .rds file uploaded on request by @Spacedman.