# 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)
# Calculate the LAD profile
lad_profile = lad.profile(VOXELS_LAD)
lidar.lai = lai(lad_profile); lidar.lai
understory.lai = lai(lad_profile, min = 1, max = 5); understory.lai
# relative LAD PROFILE
relative.lad_profile = lad.profile(VOXELS_LAD, relative = TRUE)
#understory relative LAI (% of total LAI)
relative.understory.lai = lai(relative.lad_profile, min = 1, max = 5); relative.understory.lai
# }
Run the code above in your browser using DataLab