I've got three global soil texture rasters (sand
, clay
and silt
). I want to merge these rasters into one raster with two categories (coarse
and fine
) based on relative percentages of sand
, clay
and silt
. I've done this before when working with dataframe in this way:
kiwi <- kiwi %>% mutate(group = case_when(
clay_value_avg < 20 ~ "coarse",
silt_value_avg > 80 ~ "coarse",
clay_value_avg > 20 ~ "fine",
silt_value_avg < 80 ~ "fine"
))
Can I do something like this with raster? Thanks,