Circular Analyses Helper Functions
Overview
Light-weight functions for computing descriptive statistics in different circular spaces (e.g., 2pi, 180, or 360 degrees), to handle angle-dependent biases, pad circular data, and more. Specifically aimed for psychologists and neuroscientists analyzing circular data. Basic methods are based on Jammalamadaka and SenGupta (2001) doi:10.1142/4031, removal of cardinal biases is based on the approach introduced in van Bergen, Ma, Pratte, & Jehee (2015) doi:10.1038/nn.4150 and Chetverikov and Jehee (2023) doi:10.1038/s41467-023-43251-w.
density_asymmetry(): the kernel density estimate is now wrapped around the circle (wrap = TRUE), so mass near +/-circ_space/2 is no longer truncated. This is a no-op to ~1e-13 for orientation or colour errors, but it matters for data with a 180-degrees-off reversal mode, such as motion direction.density_asymmetry(): the +/-circ_space/2 point is now excluded from the positive and negative sums (exclude_antipode = TRUE), like zero. It is the same angle reached from two sides, and with an oddnit was counted twice.density_asymmetry(): a bandwidth narrower than the grid spacing now rescalesyvarand the bandwidth together (rescale_narrow = TRUE) so the kernel spans at least one cell. Without it, the rectangle sum aliases: on a narrow error distribution withbw.SJ()-selected bandwidth the returned asymmetry was off by 7.5% of its value at the defaultn = 181, now 0.4%.
Show all changes in 1.4.0Hide the rest of the changes in 1.4.0
density_asymmetry(): the two signs are now paired on a roundedabs(x), sinceseq()is not bitwise symmetric for everyn(onn = 1801, 604 of 900 pairs failed to match and dropped out of the sums entirely).density_asymmetry_discrete(): the same four fixes, with the same argument names and defaults. Wrapping there is done by evaluatingstats::density()over the neighbouring periods and folding the images back, since augmenting the sample with shifted copies would run intodensity()'s binning range.- The fixes above default to the corrected behaviour; pass
wrap = FALSE,exclude_antipode = FALSE,rescale_narrow = FALSEfor pre-1.4.0 results.
From NEWS.md in the release
Install
Health
- OK13 OK2026-10-17
- NOTE8 OK, 5 NOTE2026-10-01
- ERROR7 OK, 5 NOTE, 1 ERROR2026-09-30
- NOTE8 OK, 5 NOTE2026-08-17
- ERROR8 OK, 4 NOTE, 1 ERROR2026-08-09
Show 9 earlier changesHide 9 earlier changes
- NOTE8 OK, 5 NOTE2026-07-06
- ERROR7 OK, 5 NOTE, 1 ERROR2026-07-05
- NOTE8 OK, 5 NOTE2026-06-04
- ERROR7 OK, 5 NOTE, 1 ERROR2026-05-27
- NOTE8 OK, 5 NOTE2026-05-10
- WARNING7 OK, 5 NOTE, 1 WARNING2026-05-09
- NOTE9 OK, 5 NOTE2026-04-22
- ERROR8 OK, 5 NOTE, 1 ERROR2026-04-18
- NOTE3 OK, 11 NOTE2026-03-10
Documentation
- Help pages
- 23 (4 internal)includes a package overview page
- Examples that run
- 100%16 run in a plain check
- Exported functions with examples
- 94%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 26%
Downloads
Repository
- PRs merged (all time)
- not measured
- Median days to close, 50 most recently updated closed issues
- 453
- Median days to close, 50 most recently updated closed PRs
- not measured
Stars over time
Releases over time
Issues over time
PRs over time
Commits over time
10 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/achetverikov/circhelp 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-18 · The repository has a site deploy workflow
pkgdown site last built 2026-10-18
Show all practicesHide 2 practices
Dependencies
Installing circhelp adds 20 packages (8 with compiled code, 25 MB of source tarballs). Heaviest: ggplot2 6.0 MB, data.table 5.7 MB, patchwork 3.2 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 1.4.0Latest2026-10-09 · current release · diff ↗ ·
added 6 exports
angle_diff, circ_mean, circ_sd, density_asymmetry, density_asymmetry_discrete, smoothed_circ_sd - RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- 1.12024-07-04
- RR 4.4.0 released · 2024-04-24
Package metadata
- First published
- 2024-07-04
- Total releases
- 2 / 2 yrs
- License
- CC0
- Minimum R
- ≥ 4.1.0
- Bundled data
- 151 KB / 2 files
- Download size
- 762 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("circhelp")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-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.