tsl_stats {distantia}R Documentation

Summary Statistics of Time Series Lists

Description

This function computes a variety of summary statistics for each time series and numeric column within a time series list. The statistics include common metrics such as minimum, maximum, quartiles, mean, standard deviation, range, interquartile range, skewness, kurtosis, and autocorrelation for specified lags.

For irregular time series, autocorrelation computation is performed after regularizing the time series via interpolation with zoo_resample(). This regularization does not affect the computation of all other stats.

This function supports a parallelization setup via future::plan(), and progress bars provided by the package progressr.

Usage

tsl_stats(tsl = NULL, lags = 1L)

Arguments

tsl

(required, list) Time series list. Default: NULL

lags

(optional, integer) An integer specifying the number of autocorrelation lags to compute. If NULL, autocorrelation computation is disabled. Default: 1.

Value

data frame:

See Also

Other tsl_processing: tsl_aggregate(), tsl_resample(), tsl_smooth(), tsl_transform()

Examples



#three time series
#climate and ndvi in Fagus sylvatica stands in Spain, Germany, and Sweden
tsl <- tsl_initialize(
  x = fagus_dynamics,
  name_column = "name",
  time_column = "time"
)


#stats computation
df <- tsl_stats(
  tsl = tsl,
  lags = 3
  )

df

[Package distantia version 2.0.0 Index]