Change stack values in R based on the first time a pixel has a certain value in R
I am working in R with terra library. I have a SpatRaster of 21 layers with values 0 and 1.
I am working in R with terra library. I have a SpatRaster of 21 layers with values 0 and 1.