# NOT RUN {
LASfile <- system.file("extdata", "Megaplot.laz", package="lidR")
lidar = readLAS(LASfile)
# Local maximum algorithm with a resolution of 2 meters
lidar %>% grid_canopy(2) %>% plot
# Local maximum algorithm with a resolution of 1 meters
lidar %>% grid_canopy(1) %>% plot
# Local maximum algorithm with a resolution of 1 meters replacing each
# point by a 20 cm radius circle of 8 points
lidar %>% grid_canopy(1, 0.2) %>% plot
# }
Run the code above in your browser using DataLab