Efficient Savitzky-Golay Filtering
Overview
Smoothing signals and computing their derivatives is a common requirement in signal processing workflows. Savitzky-Golay filters are a established method able to do both (Savitzky and Golay, 1964 doi:10.1021/ac60214a047). This package implements one dimensional Savitzky-Golay filters that can be applied to vectors and matrices (either row-wise or column-wise). Vectorization and memory allocations have been profiled to reduce computational fingerprint. Short filter lengths are implemented in the direct space, while longer filters are implemented in frequency space, using a Fast Fourier Transform (FFT).
- Fix a crash on R >= 4.3 in
sgolayfilt()when a plain (unclassed) filter coefficient matrix is passed asp(dim(p) > 1errored inside&&for any matrix; replaced withis.matrix(p)). sgolayfilt()now validates that a custom filter coefficient matrixphas an odd number of rows, instead of silently producing incorrect boundary values.sgolayfilt()now errors with a clear message whenxis shorter than the filter length, instead of an obscure "subscript out of bounds" error.- Added regression tests for the "auto" engine's filter-length threshold and the fft-to-filter NA fallback.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 2 (1 internal)
- Examples that run
- 100%1 run in a plain check
- Exported functions with examples
- 50%
- Documented parameters
- 83%
- Return-value docs
- 50%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 6
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Issues over time
Commits over time
7 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/zeehio/sgolay on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
The repository owner accepts GitHub Sponsors
Show all practicesHide 2 practices
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-07-09Pull request it wrote: opened by a project memberCommits: 5 by its own account · at least 5 crediting it in the message
- Claude Sonnet 55 commits · Jul 2026
Dependencies
Installing sgolay adds 1 package (1 with compiled code, 1.9 MB of source tarballs). Heaviest: signal 1.9 MB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 1.0.4Latest
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 1.0.32023-04-05 · diff ↗
- 1.0.22022-09-29
- RR 4.2.0 released · 2022-04-22
Package metadata
- First published
- 2022-09-29
- Total releases
- 3 / 4 yrs
- License
- GPL (>= 2) OSI
- Download size
- 26 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("sgolay")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-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.