Extract Trends from Time Series
Overview
Provides a unified interface to extract trends, cycles, and seasonal components from monthly and quarterly time series using established filters and smoothers from econometrics and signal extraction, with frequency-aware defaults for common economic frequencies. Rolling and year-to-date aggregations are also available, including the compounded accumulation of rates of change.
augment_trends()anddetrend_series()now accept tsibbles withDate,yearmonth, oryearquarterindices and return tsibbles with the original index and key. Index and key supply the default date and grouping columns;tsibbleis optional inSuggests. Other data-frame functions accept tsibbles with aDateindex and explain how to convert other index classes.- Added
stats = "change"toaugment_rolling()androll_series()for the change of a level overwindowperiods, as a decimal or in percent withpercent = TRUE(#29). - Added
window = "all"toaugment_rolling()androll_series()for an expanding window from the first observation, such as a price index chained from monthly inflation (#30).
From NEWS.md in the release
Install
Health
ERRORtestsr-release-windows-x86_64
Running 'testthat.R' [40s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(trendseries)
>
> # Load required packages for testing
> if (requireNamespace("mFilter", quietly = TRUE)) {
+ library(mFilter)
+ }
>
> test_check("trendseries")
Auto-detected quarterly (4 obs/year)
Auto-detected quarterly (4 obs/year)
Computing 1 method(s) for 2 group(s):
i Methods: "ucm"
i Groups: "alpha" and "beta"
Auto-detected monthly (12 obs/year)
Auto-detected quarterly (4 obs/year)
Computing STL decomposition with s.window = "periodic"
Auto-detected quarterly
...[truncated]...
ndex", methods = c("stl", "seats"), .quiet = TRUE)`: X-13ARIMA-SEATS estimation failed.
x X-13 has returned a non-zero exist status, which means that the current spec file cannot be processed for an unknown reason.
i X-13 needs at least 3 full years of monthly or quarterly data and a regular series.
Backtrace:
▆
1. └─trendseries::deseason_series(...) at test-deseason_series.R:119:3
2. └─trendseries::decompose_series(...)
3. └─trendseries:::.decompose_series_single(...)
4. └─trendseries:::.decompose_seats(ts_fit, .quiet, call)
5. └─base::tryCatch(...)
6. └─base (local) tryCatchList(expr, classes, parentenv, handlers)
7. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
8. └─value[[3L]](cond)
9. └─cli::cli_abort(...)
10. └─rlang::abort(...)
[ FAIL 1 | WARN 3 | SKIP 7 | PASS 1271 ]
Error:
! Test failures.
Execution halted- ERROR12 OK, 1 ERROR2026-10-20
- OK13 OK2026-10-17
- ERROR12 OK, 1 ERROR2026-09-24
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
Show 3 earlier changesHide 3 earlier changes
- OK13 OK2026-06-08
- ERROR12 OK, 1 ERROR2026-06-07
- OK14 OK2026-03-10
Documentation
The repository also keeps web-only articles.
- Help pages
- 25 (1 internal)
- 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
- 0%
Downloads
Repository
- PRs merged (all time)
- 93%
- Median days to close, 50 most recently updated closed issues
- 48
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
10 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/viniciusoike/trendseries on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-10-19 · The repository has a site deploy workflow
pkgdown site last built 2026-10-19
Show all practicesHide 1 practice
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2025-09-14Named in .Rbuildignore: .claude, CLAUDE.mdNamed in .gitignore: .claude, CLAUDE.mdPull request it wrote: opened by a project memberCommits: at least 143 crediting it in the message
- Claude Sonnet 4.634 commits · Mar to May 2026
- Claude Opus 4.67 commits · Feb to Mar 2026
- Claude Opus 4.53 commits · Dec 2025
Some of these counts are a minimum, because the search stopped before the oldest commits.
Dependencies
Installing trendseries adds 23 packages (14 with compiled code, 28 MB of source tarballs). Heaviest: BH 14 MB, data.table 5.7 MB, Rcpp 1.8 MB.
Code & Tests
Datasets
People & History
Package metadata
- First published
- 2025-11-12
- Total releases
- 4 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 332 KB / 13 files
- Download size
- 755 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("trendseries")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-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.