Tidy Anomaly Detection
Overview
The 'anomalize' package enables a "tidy" workflow for detecting anomalies in data. The main functions are time_decompose(), anomalize(), and time_recompose(). When combined, it's quite simple to decompose time series, detect anomalies, and create bands separating the "normal" data from the anomalous data at scale (i.e. for multiple time series). Time series decomposition is used to remove trend and seasonal components via the time_decompose() function and methods include seasonal decomposition of time series by Loess ("stl") and seasonal decomposition by piecewise medians ("twitter"). The anomalize() function implements two methods for anomaly detection of residuals including using an inner quartile range ("iqr") and generalized extreme studentized deviation ("gesd"). These methods are based on those used in the 'forecast' package and the Twitter 'AnomalyDetection' package. Refer to the associated functions for specific references for these methods.
Prepare for supercession by timetk. Note that anomalize R package will be maintained for backwards compatibility. Users may wish to add these 2 lines of code to existing codebases that use the legacy anomalize R package:
``` r
library(anomalize)
anomalize <- anomalize::anomalize
plot_anomalies <- anomalize::plot_anomalies
```
From NEWS.md in the release
Install
Health
- OK13 OK2026-09-08
- ERROR12 OK, 1 ERROR2026-09-07
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
Show 2 earlier changesHide 2 earlier changes
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 14includes a package overview page
- Examples that run
- 75%9 run in a plain check · 3 never run
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 92%
- Help pages citing references
- 29%
Downloads
Repository
- PRs merged (all time)
- 90%
- Median days to close, 50 most recently updated closed issues
- 3
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Issues over time
PRs over time
11 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/business-science/anomalize on 2026-10-18.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2023-12-28 · The repository has a site deploy workflow
Show all practicesHide 2 practices
Dependencies
Installing anomalize adds 123 packages (66 with compiled code, 106 MB of source tarballs). Heaviest: BH 14 MB, stringi 11 MB, ggplot2 6.0 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 0.3.0Latest
- 0.2.42023-09-26 · diff ↗
- unarchivedReturned to CRAN2023-09-25
- RR 4.3.0 released · 2023-04-21
- archivedRemoved from CRAN2023-03-23requires archived package 'sweep'
- 0.2.32023-02-09 · diff ↗
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- 0.2.22020-10-20 · diff ↗
- unarchivedReturned to CRAN2020-06-19
- 0.2.12020-06-19 · diff ↗
- archivedRemoved from CRAN2020-06-15check problems were not corrected in time
- RR 4.0.0 released · 2020-04-24
Package metadata
- First published
- 2018-04-06
- Total releases
- 8 / 8 yrs
- License
- GPL (>= 3) OSI
- Minimum R
- ≥ 3.0.0
- Bundled data
- 40 KB / 1 file
- Download size
- 2.9 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("anomalize")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-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.