It would not be that hard to pass R functions to fasterize for arbitrary aggregation functions, but it would also definitely be a huge slowdown. For any function that needs the entire vector of values, its probably better to first collect the values and then run calc.
Basically, a different version of "sum", per #13, we just need to be clear what happens with NAs.
We can also do running variance: https://www.johndcook.com/blog/standard_deviation/
It would not be that hard to pass R functions to fasterize for arbitrary aggregation functions, but it would also definitely be a huge slowdown. For any function that needs the entire vector of values, its probably better to first collect the values and then run
calc
.