# \donttest{
library(terra)
lsat <- rast(system.file("/extdata/Landsat_TM5.tif", package="spatialEco"))
plotRGB(lsat, r=3, g=2, b=1, scale=1.0, stretch="lin")
ndvi <- ( lsat[[4]] - lsat[[3]] ) / (lsat[[4]] + lsat[[3]])
# Using Jonckheere et al., (2004) method
lai01 <- lai(ndvi)
plot(lai01)
# }
Run the code above in your browser using DataLab