# load LAS file
LASfile <- system.file("extdata", "las_chablais3.laz", package="lidaRtRee")
las_chablais3 <- lidR::readLAS(LASfile)
# set number of threads
lidR::set_lidr_threads(2)
# create digital terrain model with points classified as ground
dtm <- points2DTM(las_chablais3)
# display raster
terra::plot(dtm)
Run the code above in your browser using DataLab