# NOT RUN {
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
las = readLAS(LASfile)
# Canopy surface model with 4 m^2 cells
plot(grid_canopy(las))
# Mean height with 400 m^2 cells
plot(grid_metrics(las, mean(Z)))
# With multiple metrics
metrics = grid_metrics(las, .stdmetrics_z)
plot(metrics)
plot(metrics, "zmean")
plot(metrics, "zmax")
# }
Run the code above in your browser using DataLab