Below is the code to compute all standard metrics from R package lidR.

x <- pixel_metrics(las_catalog, .stdmetrics, res = 30)

I want to compute only few pixel metrics only, like :

imean, zsd, iskew, zkurt, zpcum7, ipcumzq90, itot

Anybody got an idea on how to do this?

  • 1
    It is not possible. You must define your own function with your own metrics
    – JRR
    Mar 12, 2022 at 23:31
  • @JRR Thank you for clarification. Isn't grid_metrics and pixel_metrics same thing? Mar 13, 2022 at 16:32
  • 1
    pixel_metric is the new function name. If recent questions can refer to recent convention it's better.
    – JRR
    Mar 13, 2022 at 17:56

1 Answer 1


As JRR mentioned, define your own function. For example:

f <- function(z, i) {
    mean = mean(z), 
    sd = sd(i),
    imean = mean(i))

m <- pixel_metrics(las, func = ~f(Z, Intensity))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.