# NOT RUN {
# Get the example laz file
normlas.file = system.file("extdata", "lidar_example.laz", package="leafR")
# Calculate LAD from voxelization
VOXELS_LAD = lad.voxels(normlas.file,
grain.size = 2)
lad_profile = lad.profile(VOXELS_LAD)
plot(lad_profile$height ~ lad_profile$lad, type = "l", ylim = c(0, 40),
ylab = "Canopy height (m)", xlab = "LAD (m2/m3)")
# relative LAD PROFILE
relative.lad_profile = lad.profile(VOXELS_LAD, relative = TRUE)
plot(relative.lad_profile$height ~ relative.lad_profile$lad, type = "l", ylim = c(0, 40),
ylab = "Canopy height (m)", xlab = "LAD (% of LAI)")
# }
Run the code above in your browser using DataLab