Calculate the Periodogram of a Time-Course
Overview
Provides a consistent interface to use various methods to calculate the periodogram and estimate the period of a rhythmic time-course. Methods include Lomb-Scargle, fast Fourier transform, and three versions of the chi-square periodogram. See Tackenberg and Hughey (2021) doi:10.1371/journal.pcbi.1008567.
- Revised code to not need
globalVariables()in order to pass R CMD check.
From NEWS.md in the release
Install
Health
ERRORtestsr-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64
r-release-macos-arm64
Running ‘testthat.R’ [1s/1s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(spectr)
>
> test_check('spectr')
Saving _problems/test_pgram-15.R
Saving _problems/test_pgram-24.R
Saving _problems/test_pgram-33.R
Saving _problems/test_pgram-41.R
Saving _problems/test_pgram-49.R
Saving _problems/test_spectr-15.R
Saving _problems/test_spectr-24.R
Saving _problems/test_spectr-33.R
Saving _problems/test_spectr-42.R
Saving _problems/test_spectr-51.R
[ FAIL 10 | WARN 0 | SKIP 0 | PASS 3 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test_pgram.R:15:3'): CSP greedy ─────────────────────────────────────
Error in `dyn.load(file, DLLpath = DLLpath, ...)`: unable to load shared object '/Volumes/Builds/packages/sonoma-arm64/Rlib/4.6/qs/libs/qs.so':
dlopen(/Volumes/Builds/packages/sonoma-arm64/Rlib/4.6/qs/libs/qs.so, 0x0006): Symbol not found: _SET_CLOENV
Referen
...[truncated]...
t_spectr.R:42:3
2. └─base::library.dynam(lib, package, package.lib)
3. └─base::dyn.load(file, DLLpath = DLLpath, ...)
── Error ('test_spectr.R:51:3'): spectr FFT ────────────────────────────────────
Error in `dyn.load(file, DLLpath = DLLpath, ...)`: unable to load shared object '/Volumes/Builds/packages/sonoma-arm64/Rlib/4.6/qs/libs/qs.so':
dlopen(/Volumes/Builds/packages/sonoma-arm64/Rlib/4.6/qs/libs/qs.so, 0x0006): Symbol not found: _SET_CLOENV
Referenced from: <AA665871-E63C-349E-A381-34F936D898C9> /Volumes/Builds/packages/sonoma-arm64/Rlib/4.6/qs/libs/qs.so
Expected in: <463735C6-E22F-3AE6-AEF9-E59BA5B5FC66> /Library/Frameworks/R.framework/Versions/4.6/Resources/lib/libR.dylib
Backtrace:
▆
1. └─base::loadNamespace(x) at test_spectr.R:51:3
2. └─base::library.dynam(lib, package, package.lib)
3. └─base::dyn.load(file, DLLpath = DLLpath, ...)
[ FAIL 10 | WARN 0 | SKIP 0 | PASS 3 ]
Error:
! Test failures.
Execution haltedr-release-macos-x86_64
Running ‘testthat.R’ [3s/4s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(spectr)
>
> test_check('spectr')
Saving _problems/test_pgram-15.R
Saving _problems/test_pgram-24.R
Saving _problems/test_pgram-33.R
Saving _problems/test_pgram-41.R
Saving _problems/test_pgram-49.R
Saving _problems/test_spectr-15.R
Saving _problems/test_spectr-24.R
Saving _problems/test_spectr-33.R
Saving _problems/test_spectr-42.R
Saving _problems/test_spectr-51.R
[ FAIL 10 | WARN 0 | SKIP 0 | PASS 3 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test_pgram.R:15:3'): CSP greedy ─────────────────────────────────────
Error in `dyn.load(file, DLLpath = DLLpath, ...)`: unable to load shared object '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.6/qs/libs/qs.so':
dlopen(/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.6/qs/libs/qs.so, 0x0006): Symbol not found: _SET_CLOENV
Ref
...[truncated]...
:3
2. └─base::library.dynam(lib, package, package.lib)
3. └─base::dyn.load(file, DLLpath = DLLpath, ...)
── Error ('test_spectr.R:51:3'): spectr FFT ────────────────────────────────────
Error in `dyn.load(file, DLLpath = DLLpath, ...)`: unable to load shared object '/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.6/qs/libs/qs.so':
dlopen(/Volumes/Builds/packages/big-sur-x86_64/Rlib/4.6/qs/libs/qs.so, 0x0006): Symbol not found: _SET_CLOENV
Referenced from: <38F2B027-A0B8-34C3-82BB-B64B0EC2EA4D> /Volumes/Builds/packages/big-sur-x86_64/Rlib/4.6/qs/libs/qs.so
Expected in: <174E517E-2847-39E5-BA5A-7AD14DA5B6DC> /Library/Frameworks/R.framework/Versions/4.6-x86_64/Resources/lib/libR.dylib
Backtrace:
▆
1. └─base::loadNamespace(x) at test_spectr.R:51:3
2. └─base::library.dynam(lib, package, package.lib)
3. └─base::dyn.load(file, DLLpath = DLLpath, ...)
[ FAIL 10 | WARN 0 | SKIP 0 | PASS 3 ]
Error:
! Test failures.
Execution haltedr-release-windows-x86_64
Running 'testthat.R' [4s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(spectr)
>
> test_check('spectr')
Saving _problems/test_pgram-15.R
Saving _problems/test_pgram-24.R
Saving _problems/test_pgram-33.R
Saving _problems/test_pgram-41.R
Saving _problems/test_pgram-49.R
Saving _problems/test_spectr-15.R
Saving _problems/test_spectr-24.R
Saving _problems/test_spectr-33.R
Saving _problems/test_spectr-42.R
Saving _problems/test_spectr-51.R
[ FAIL 10 | WARN 0 | SKIP 0 | PASS 3 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test_pgram.R:15:3'): CSP greedy ─────────────────────────────────────
Error in `inDL(x, as.logical(local), as.logical(now), ...)`: unable to load shared object 'D:/RCompile/CRANpkg/lib/4.6/qs/libs/x64/qs.dll':
LoadLibrary failure: Die angegebene Prozedur wurde nicht gefunden.
Backtrace:
▆
1. └─base::loadNamespace(x) at
...[truncated]...
.dll':
LoadLibrary failure: Die angegebene Prozedur wurde nicht gefunden.
Backtrace:
▆
1. └─base::loadNamespace(x) at test_spectr.R:42:3
2. └─base::library.dynam(lib, package, package.lib)
3. └─base::dyn.load(file, DLLpath = DLLpath, ...)
4. └─base (local) inDL(x, as.logical(local), as.logical(now), ...)
── Error ('test_spectr.R:51:3'): spectr FFT ────────────────────────────────────
Error in `inDL(x, as.logical(local), as.logical(now), ...)`: unable to load shared object 'D:/RCompile/CRANpkg/lib/4.6/qs/libs/x64/qs.dll':
LoadLibrary failure: Die angegebene Prozedur wurde nicht gefunden.
Backtrace:
▆
1. └─base::loadNamespace(x) at test_spectr.R:51:3
2. └─base::library.dynam(lib, package, package.lib)
3. └─base::dyn.load(file, DLLpath = DLLpath, ...)
4. └─base (local) inDL(x, as.logical(local), as.logical(now), ...)
[ FAIL 10 | WARN 0 | SKIP 0 | PASS 3 ]
Error:
! Test failures.
Execution halted- ERROR10 OK, 3 ERRORNow
- ERROR13 OK, 1 ERROR2026-03-10
Documentation
- Help pages
- 1
- Examples that run
- 100%1 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 90%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 0
- Median days to close, 50 most recently updated closed PRs
- 6
Stars over time
Releases over time
Issues over time
PRs over time
6 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/hugheylab/spectr on 2026-10-22.
pkgdown site last built 2022-12-01
Show all practicesHide 1 practice
Dependencies
Installing spectr adds 69 packages (35 with compiled code, 65 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.
Code & Tests
People & History
- 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
- RR 4.2.0 released · 2022-04-22
- 1.0.1Latest2022-02-07 · current release
- RR 4.1.0 released · 2021-05-18
Package metadata
- First published
- 2022-02-07
- Total releases
- 1 / 4 yrs
- License
- GPL-2 OSI
- Minimum R
- ≥ 3.6
- Download size
- 13 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("spectr")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.