This function calculates the extent or largest length of the bounding box of a mesh or a DEM.
extent(data)
Digital elevation model of class RasterLayer or a triangular mesh of class mesh3d.
A value, the extent of the mesh or DEM.
There are several extent function is other packages, including the raster package. Therefore it is recommended to use the package namespace, see examples below.
habtools::extent(mcap)
#> [1] 0.3793157
habtools::extent(horseshoe)
#> [1] 8