Calculate statistics for a spatial dataset.

spatial_data_statistics(x, type, index = 1)

# S3 method for sf
spatial_data_statistics(x, type, index = 1)

# S3 method for Raster
spatial_data_statistics(x, type, index = 1)

# S3 method for data.frame
spatial_data_statistics(x, type, index = 1)

Arguments

x

sf::st_sf() or raster::stack() or data.frame dataset object.

type

character indicating whether the dataset contains continuous (i.e. "continuous") or categorical (i.e. "categorical") data.

index

integer or character value indicating the field or layer for which to calculate statistics. Defaults to 1, such that the first field/layer is used to calculate statistics.

Value

A list containing statistics for the data.