Usage
# S4 method for SpatRaster
rowSums(x, na.rm=FALSE, dims=1L, ...)
# S4 method for SpatRaster
colSums(x, na.rm=FALSE, dims=1L, ...)
# S4 method for SpatRaster
rowMeans(x, na.rm=FALSE, dims=1L, ...)
# S4 method for SpatRaster
colMeans(x, na.rm=FALSE, dims=1L, ...)