Matrix Profile for R
Overview
This is the core functions needed by the 'tsmp' package. The low level and carefully checked mathematical functions are here. These are implementations of the Matrix Profile concept that was created by CS-UCR http://www.cs.ucr.edu/~eamonn/MatrixProfile.html.
- **Parallel execution and fork**: Documented limitations of fork-based workers with native threads, including STOMP and MPX. Recommend PSOCK clusters with
n_workers = 1per process for parallel execution across series. Existing fork warnings now clarify that reducing the thread count cannot undo inherited library state and does not guarantee safe fork-based execution. - **Native Multivariate STOMP (
mstomp)**: Added native high-performance C++ engine (mstomp_rcpp) with multi-threading viaRcppThread, properly sorting must/exclusion dimensions, and fixing historical edge cases where must dimensions could be omitted from accumulated distances. Delivers ~197x speedup over legacy pure R execution.
Show all changes in 0.1.12Hide the rest of the changes in 0.1.12
- **Missing Value Handling in Rolling Window Functions (
na_strategy&na.rm)**: Implemented complete missing/non-finite value support acrossmov_mean(),mov_sum(),mov_var(),mov_std(),mov_min(),mov_max(),movmean_std(), andmuinvn()with explicitna_strategy = c("window_na", "remove", "error")and standardna.rmargument compatibility. Default"window_na"returnsNA_real_strictly for windows intersecting non-finite values without corrupting adjacent valid windows or stopping execution. - **Multithreaded MASS Variants (
mass)**: Extended multi-threading viaRcppThreadto all MASS variants (v2,weighted,non_normalized,absolute) inmass()and C++ backend (mass2_rcpp,mass_weighted_rcpp,mass_absolute_rcpp), matchingmass3_rcpp_parallelwith identical numerical output. - **Native MPdist Engine**: Added native high-performance C++ implementation of MPdist (
mpdist_vect_rcppandmpdist_simple_rcpp) with multi-threaded parallel execution viaRcppThread. - **Zero Allocation & O(N) Sliding Min**: Implemented linear-time monotonic deque for sliding window minimum and $O(K)$ selection with
std::nth_element, replacing expensive R matrix and data frame allocations and providing massive speedups (over 10x-100x). - **Exported
mpdist()API**: Exportedmpdist(ref_data, query_data, window_size, type = c("simple", "vector"), thr = 0.05, n_workers = 1)in R with dedicated unit test suite.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK12 OK2026-04-25
- NOTE11 OK, 3 NOTE2026-04-22
- ERROR10 OK, 3 NOTE, 1 ERROR2026-04-18
Show 3 earlier changesHide 3 earlier changes
- NOTE11 OK, 3 NOTE2026-04-10
- ERROR10 OK, 3 NOTE, 1 ERROR2026-04-09
- NOTE11 OK, 3 NOTE2026-03-10
Documentation
- Help pages
- 12
- Examples that run
- 100%10 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 42%
Downloads
Repository
- PRs merged (all time)
- 50%
- Median days to close, 50 most recently updated closed issues
- 4
- Median days to close, 50 most recently updated closed PRs
- 4
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
25 development-tooling and community-health practices detected across 10 families in the upstream repository
Checks run against github.com/matrix-profile-foundation/matrixprofiler on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-10-14 · The repository has a site deploy workflow
pkgdown site last built 2026-10-14
Show all practicesHide 6 practices
This repository shows signs of AI coding tools.
- GitHub Copilotfirst seen 2025-12-16Seen in the repository: .github/copilot-instructions.md
Dependencies
Installing matrixprofiler adds 4 packages (4 with compiled code, 2.4 MB of source tarballs). Heaviest: Rcpp 1.8 MB, RcppThread 308 KB, checkmate 247 KB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.1.12Latest2026-10-14 · current release · diff ↗ ·
added 7 exports
has_cuda, mpdist, mpx_stream_right, mpx_stream_s_right, mstomp, rfcp, rfcp_top_k - RR 4.6.0 released · 2026-04-24
- 0.1.102025-12-01 · diff ↗
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- unarchivedReturned to CRAN2023-01-26
- 0.1.9
- archivedRemoved from CRAN2023-01-25issues were not corrected in time
- RR 4.2.0 released · 2022-04-22
- 0.1.72021-11-23 · diff ↗
- 0.1.52021-05-26 · diff ↗
- RR 4.1.0 released · 2021-05-18
- unarchivedReturned to CRAN2021-03-03
- 0.1.42021-03-03 · diff ↗ ·
added 8 exports
binary_split, complexity, corr_ed, ed_corr, mode, normalize, std, znorm - archivedRemoved from CRAN2021-02-25check problems were not corrected in time
Show 5 earlier eventsHide 5 earlier events
- unarchivedReturned to CRAN2021-02-17
- 0.1.3
- archivedRemoved from CRAN2021-02-12policy violation Wasting the time of the CRAN team - asking question and re-submitting with the same error without waiting for a reply
- 0.1.12021-02-11
- RR 4.0.0 released · 2020-04-24
Package metadata
- First published
- 2021-02-11
- Total releases
- 8 / 5 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 4.1
- Bundled data
- 7.2 KB / 1 file
- Download size
- 360 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("matrixprofiler")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-20, which the citation names so these numbers can be found later. More on citing and the projects behind them.