# builds the attribute table for the legend dNBR_reclass <- ratify(dNBR_reclass) rat <- levels(dNBR_reclass)[[1]] # creates the text that will be on the legend rat$legend <- c("NA", "Enhanced Regrowth, High", "Enhanced Regrowth, Low", "Unburned", "Low Severity", "Moderate-low Severity", "Moderate-high Severity", "High Severity") levels(dNBR_reclass) <- rat