require: raster package
I am having trouble masking values of one raster using values in another. This is similar to this question:
but it doesn't have the moving window (focal function) as a component of the question. I have two rasters with the same dimension, extent, projection.
The only pixels I want from MAT2resampled are those with the value 1 in wintPCP.
I used this code:
PthreshWint2 <- mask(MAT2resampled, wintPCP)
When I plot PthreshWint2, it doesn't appear as though the MAT2resampled raster has been masked at all. I think I'm missing something simple.
I have posted the two rasters here: https://drive.google.com/open?id=118kCu6QpoXSYmA17PpODRhHDJefHPkx1