I am attempting to understand how NDVI values have changed at my study area over 32 years. More specifically, I need to evaluate how the NDVI value of each pixel has changed over 32 years. For this I need I have 32 Landsat image for which I have calculated NDVI, giving me 32 rasters of NDVI. My problem arises in trying applying the Mann-Kendall test on every pixel of my raster stack in R to produce 2 new rasters, one conveying the tau of each pixel and the other the p-value of each pixel.
I have attempted to convert my raster stack to dataframe and run the mann-kendall but have found no way to write to a new raster. I also tried to utilize the lapply function, but I don't believe that applies to rasters.
Any input into this is much appreciated.