terra mask raster by categorical raster
I have a ginormous raster (rasterA) with values in the range 1:928863, and I want values in another raster, rasterB, set to NA where values(rasterA) > 300. The analogy with my example is: I want the values in r set to NA where values in rf == “forest”.