Skip to content

anomalize

0.3.0

Tidy Anomaly Detection

2packages depend
41.5Kdownloads / year
79.0%test coverage
13/13checks pass

Overview

About
Maintained by Matt DanchoFirst published 2018-04-068 releasesCRAN page ↗GitHub ↗

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.

Install

Health

CRAN checks
13OK
Slowest check: 4.6 min · r-devel-linux-x86_64-fedora-clang
Code health
Yes
Tests · ratio 0.25
79.0%
Coverage · measured lines
100%
Documentation · exports
10
Dependencies · direct
Check history
  • OK2026-06-09
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-06-08
    12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 461 wordsVignettesYes · dynamicpkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
75%
Documented parameters
100%
Return-value docs
92%
References docs
29%

Downloads

41.5K
CRAN downloads in the past year
Rank #3,872 · ~114/day · ~3.5K/mo
Daily download trend is not available in this view yet.
74630 days
2.6K90 days
41.5K1 year
Compare downloads with other packages →
Also on172 r2u64 autocran104 c2d4u

Repository

Repository
339Stars
61Forks
35Open issues
3Open PRs
0Releases
125Commits
7Contributors
detect-anomaliesdecompositioniqrtime-seriesanomaly-detectionanomalyr-package
125 commits · Last activity 2023-12-28 · 0% stars, 30d

Stars over time

2025-06-22 · 3372026-07-07 · 339

Repository practices

Upstream repositoryBeta

7 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/business-science/anomalize on 2026-07-19.

Continuous integration (1)
GitHub Actions
Reproducibility and dev environment (1)
data-raw/
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Docs source (1)
README.Rmd
Show all practices
Lint, format, editor (1)
RStudio project
Coverage (1)
Codecov
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
19 external dependencies (excludes base and recommended)
Depends (1)
R >= 3.0.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
2direct
0indirect

Code & Tests

Code Composition
R 2,840 (64%)Rd 914 (21%)Vignettes 683 (15%)
Code characteristics
Object systems
S326
Cyclomatic complexity
1.0 median / 8 max
Test cases
45 / 0.25 per code line

Test coverage

Line coverage

79%

Expression

81.5%

Tests / Examples

79.0% / 64% ex

Functions

62 17 exported

Complexity

2 avg / 8 max

Call network

62 nodes / 47 edges

Loading call graph…

Lowest coverage

62 functions
FunctionCycloCoverage
set_time_scale_template exp20%
time_scale_template exp10%
.onLoad10%
anomalize.default10%
palette_dark10%
palette_green10%

People & History

People (2)
Maintainer (1)
Author, Maintainer
Authors (2)
Author, Maintainer
Package Timeline

8 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 0.3.0Latest
    2023-10-31 · current release · diff ↗
  • 0.2.4
    2023-09-26 · diff ↗
  • unarchivedReturned to CRAN
    2023-09-25
  • R
    R 4.3.0 released · 2023-04-21
  • archivedRemoved from CRAN
    2023-03-23
    requires archived package 'sweep'
  • 0.2.3
    2023-02-09 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 0.2.2
    2020-10-20 · diff ↗
  • 0.2.1
    2020-06-19 · diff ↗
  • unarchivedReturned to CRAN
    2020-06-19
  • archivedRemoved from CRAN
    2020-06-15
    check problems were not corrected in time
  • R
    R 4.0.0 released · 2020-04-24
Show 6 earlier events
  • 0.2.0
    2019-09-21 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
  • R
    R 3.5.0 released · 2018-04-23
  • 0.1.1
    2018-04-17 · diff ↗
  • 0.1.0
    2018-04-06
  • R
    R 3.4.0 released · 2017-04-21

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
Installed size
not tracked yet
With dependencies
not tracked yet
Appears in task views
Report a problem with this page →