R package distantia

Graph by Blas M. Benito

DOI CRAN\_Release\_Badge CRAN\_Download\_Badge

Description

The R package distantia, available on CRAN, offers an efficient, feature-rich toolkit for managing, comparing, and analyzing time series data. It is designed to handle a wide range of scenarios, including:

  • Multivariate and univariate time series.
  • Regular and irregular sampling.
  • Time series of different lengths.

Key Features

Comprehensive Analytical Tools

  • 10 distance metrics: see distantia::distances.
  • The normalized dissimilarity metric psi.
  • Free and Restricted Dynamic Time Warping (DTW) for shape-based comparison.
  • A Lock-Step method for sample-to-sample comparison
  • Restricted permutation tests for robust inferential support.
  • Analysis of contribution to dissimilarity of individual variables in multivariate time series.
  • Hierarchical and K-means clustering of time series based on dissimilarity matrices.

Computational Efficiency

  • A C++ back-end powered by Rcpp.
  • Parallel processing managed through the future package.
  • Efficient data handling via zoo.

Time Series Management Tools

  • Introduces time series lists (TSL), a versatile format for handling collections of time series stored as lists of zoo objects.
  • Includes a suite of tsl_...() functions for generating, resampling, transforming, analyzing, and visualizing univariate and multivariate time series.

Citation

If you find this package useful, please cite it as:

Blas M. Benito, H. John B. Birks (2020). distantia: an open-source toolset to quantify dissimilarity between multivariate ecological time-series. Ecography, 43(5), 660-667. doi: 10.1111/ecog.04895.

Blas M. Benito (2024). distantia: A Toolset for Time Series Dissimilarity Analysis. R package version 2.0.0. url: https://blasbenito.github.io/distantia/.

Blas M. Benito
Blas M. Benito
Data Scientist and Team Lead

Related