This function reclassifies a raster using a provided reclassification table.
Usage
reclass_raster_to_categories(raster_map, reclass_table)
Arguments
- raster_map
A raster object to be reclassified.
- reclass_table
A data frame containing the reclassification rules. The first column must be the existing
values (ID_check) and the second column should be the new values (reclass_mat).
Value
A reclassified factor raster.
Examples
if (FALSE) {
# assuming we have a raster object "my_raster" and a reclassification table "my_table"
my_reclassed_raster <- reclass_raster_to_categories(my_raster, my_table)
}