I want to calculate the mean height of shrubs layer using the mean height of points between 0.2-4 m above ground but the raster output mean max values never is higher than 1 m which is not make sense since we have areas with mean shrubs higher than 2 m at 15 x 15 m pixel resolution.
The code I used to generate the metric
mean_shrub_height = function(z) {
SH=mean(z >= 0.2 & z <= 4)
return(list(SH =SH))
}
mean_shrub_height = grid_metrics(las, ~mean_shrub_height(Z), res = 15)