Calculate statistics for a spatial dataset.
Usage
spatial_data_statistics(x, type, index = 1)
# S3 method for class 'sf'
spatial_data_statistics(x, type, index = 1)
# S3 method for class 'SpatRaster'
spatial_data_statistics(x, type, index = 1)
# S3 method for class 'data.frame'
spatial_data_statistics(x, type, index = 1)Arguments
- x
- sf::st_sf()or a combined terra::rast or data.frame dataset object.
- type
- characterindicating whether the dataset contains continuous (i.e.- "continuous") or categorical (i.e.- "categorical") data.
- index
- integeror- charactervalue indicating the field or layer for which to calculate statistics. Defaults to 1, such that the first field/layer is used to calculate statistics.