Skip to contents

This function computes summary statistics for numeric columns in a SpatRaster or a data.frame. If a vector of metric names is specified, it only computes summary statistics for those columns. Rows with NA values are dropped.

Usage

stats_summary(data, metrics = NULL, population = FALSE, .f = NULL)

Arguments

data

A data frame containing the data to be summarized

metrics

A vector of metric names to be summarized. If NULL, all numeric columns will be summarized.

population

A logical indicating whether the summary statistics should be calculated for the population or just the sample. Default is FALSE.

.f

Single parameter statistical function to be applied

Value

A tibble object containing the computed summary statistics.