I have used this code many times over the past year and am now getting an odd error when I try to calculate rumple index.
Here is a simplified version of the code.
library(lidR)
lidar <-readALSLAS("F:/FSF_lidR/Plot_NLAS/FSF_1_N.las", filter = "-keep_classification 3 4 5 -drop_z_below 0 -drop_z_above 48") # read in clipped plot LAS data
las <-filter_surfacepoints(lidar,1)
ri <- rumple_index(las$X,las$Y,las$Z)
Error message:
Error in loadNamespace(x): there is no package called ‘geometry’
'rumple_index' returned NA.
Has there possibly been an update to a supporting package I need to reinstall? Thanks for any advice or thoughts.
MW
geometry
is in the Suggests line of the package. So that means it won't load and isn't required for the entirelidR
package, just parts of it. It's generally good practice when developing a package to notify the user of this when attempting to run a function that needs it. But they didn't here. Regardless, the R error itself tips you off to what the problem is.