| index_summary | R Documentation |
Computes descriptive statistics for one or multiple spectral index layers in a
terra::SpatRaster object, including min, max, mean, median, standard deviation,
percentiles (5th, 25th, 75th, 95th), and NA percentage.
index_summary(x, digits = 4)
x |
A |
digits |
Integer indicating the number of decimal places to round results.
Defaults to |
A data.frame of class "geo_index_summary" with one row per layer:
index |
Layer/index name. |
min |
Minimum index value. |
max |
Maximum index value. |
mean |
Mean index value. |
median |
Median index value. |
sd |
Standard deviation. |
q05 |
5th percentile. |
q25 |
25th percentile (1st quartile). |
q75 |
75th percentile (3rd quartile). |
q95 |
95th percentile. |
na_pct |
Percentage of NA values (0 to 100). |
total_cells |
Total number of raster cells. |
img <- get_example_data()
ndvi <- geo_index(img, "NDVI")
index_summary(ndvi)
# Multi-layer summary
stack <- geo_indices(img, c("NDVI", "NDWI", "NDBI"))
index_summary(stack)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.