@examples added or corrected across 78 help pages. Each runs
offline in seconds, writes nothing outside tempdir(), and is executed by
R CMD check; anything needing a device, a download or an optional backend is
fenced with the reason stated.output_assay argument of eegMorletWavelet(), eegERSP(), eegITC(),
eegMultitaper(), eegSTFT() and eegCSP() names a key in metadata(), not
an assay. Their help pages said "output assay name", so a reader looked for
assay(x, "ersp_data") and found nothing. The descriptions now say what
happens. Behaviour is unchanged.make_eeg() documents what it does not model: each channel is generated
independently, giving a median absolute between-channel correlation near 0.26
against eegBadChannels()'s corr_threshold of 0.4, so that detector
condemns every channel and eegInterpolate() is then left with none. That is
the generator being independent, not the detector being wrong.multiscaleEntropy() — multiscale entropy (Costa et al. 2002) as a standalone op, completing the
entropy family alongside sampleEntropy (via PhysioMoCap), svdEntropy, permutation/dispersion/
increment/slope entropies and Lempel-Ziv. It returns the per-scale sample entropy of the
coarse-grained signal (non-overlapping means, tolerance r×SD fixed on the original), and reproduces
NeuroKit2 entropy_multiscale (MSEn) bit-for-bit across scales 1–8 on real eegmmidb POz EEG. A rising
or sustained MSE at coarse scales marks multi-scale structure; white noise falls monotonically.katzFD() — Katz's fractal dimension (Katz 1988) as a standalone op, completing the
fractal-dimension family alongside petrosianFD() and svdEntropy(). KFD = log10(L/a)/log10(d/a)
in the amplitude-only convention used by the de-facto references. On real eegmmidb POz EEG it
reproduces both antropy.katz_fd and NeuroKit2's fractal_katz bit-for-bit (|diff| = 0
against each).eegComplexity(measure = "katz_fd") now uses the field-standard amplitude-only Katz convention
(matching antropy, NeuroKit2, pyeeg and mne-features) via katzFD(). It previously used a
Euclidean-plane variant that mixed the sample-index and amplitude axes' units, was scale-dependent,
and matched no reference implementation (e.g. KFD 1.696 vs the field-standard 3.468 on POz). The
katz_fd measure is not in the default measures set, so this affects only callers who requested it
explicitly.phaseEntropy() — phase entropy (Rohila & Sharma 2019) from the Second-Order Difference Plot (SODP):
plots each first difference against the following second difference, bins the polar angle of each
point into k sectors, and takes the normalized Shannon entropy of the angle-weighted sector
distribution. A phase-plane geometry mechanism distinct from the amplitude, template-matching and
1-D symbolic (dispersion/increment/slope) entropies. Validated against NeuroKit2.entropy_phase
bit-for-bit (max |diff| ~4e-16) across the sector count k on real eegmmidb POz EEG.slopeEntropy() — slope entropy (Cuesta-Frau 2019), a symbolic complexity measure on the slopes
between successive samples: each first difference is turned into the angle atan(dx) (degrees) and
mapped to one of five symbols by two angle thresholds (steep/gentle/flat, up/down), and SlopEn is the
Shannon entropy of the length-dimension - 1 slope patterns. Captures the shape of local trends — a
mechanism distinct from the amplitude (renyiEntropy/tsallisEntropy), NCDF-pattern
(dispersionEntropy), template-matching (fuzzyEntropy) and increment-magnitude (incrementEntropy)
entropies, completing the discrete-symbolic complexity trio. Validated against
NeuroKit2.entropy_slope bit-for-bit (max |diff| ~9e-16) across the embedding dimension on real
eegmmidb POz EEG.incrementEntropy() — increment entropy (Liu et al. 2016), a symbolic complexity measure on the
signal's increments (successive differences) rather than its amplitudes: each increment in a
length-dimension embedding vector is mapped to a word letter combining its sign (-, 0, +) with a
magnitude class in 0..q (quantized against the vector's sd), and IncrEn is the Shannon entropy of
the word distribution normalized by dimension - 1. Encodes the direction and graded size of
changes — a mechanism distinct from the amplitude-histogram (renyiEntropy/tsallisEntropy),
NCDF-pattern (dispersionEntropy) and template-matching (fuzzyEntropy) entropies. Validated
against NeuroKit2.entropy_increment bit-for-bit (max |diff| ~9e-16) across (dimension, q) on real
eegmmidb POz EEG.fuzzyEntropy() — fuzzy entropy (Chen et al. 2007), the fuzzy generalization of sample
entropy: it replaces sample entropy's crisp match threshold (a Heaviside step I(d < r)) with a
smooth exponential membership exp(-(d^n)/r), so near-matches contribute partially — markedly more
robust and continuous on short or noisy segments. Each embedding vector's local baseline is removed
before the Chebyshev distance. Completes the sample-entropy family (crisp SampEn + fuzzy FuzzyEn).
Validated against NeuroKit2.entropy_fuzzy bit-for-bit (max |diff| ~4e-15) across (dimension, r) on
real eegmmidb POz EEG; at m=2, r=0.2 it is lower than the crisp sample entropy (0.948 vs 1.327).dispersionEntropy() — dispersion entropy (Rostaghi & Azami 2016), a fast, outlier-robust
symbolic-dynamics complexity measure: NCDF symbolization into c amplitude classes -> length-
dimension dispersion patterns -> normalized Shannon entropy of the pattern distribution. A
mechanism distinct from the amplitude-histogram entropies (renyiEntropy/tsallisEntropy) and
ordinal permutation entropy. reverse = TRUE returns the reverse dispersion entropy (RDEn).
Validated against NeuroKit2.entropy_dispersion bit-for-bit for both DispEn (max |diff| 0) and
RDEn (max |diff| ~7e-18) across (c, dimension, delay) settings on real eegmmidb POz EEG.tsallisEntropy() — Tsallis entropy (Tsallis 1988): the non-additive order-q generalization
of the Shannon entropy of a signal's amplitude histogram, S_q = (1 - sum p^q)/(q-1) in nats.
q = 1 recovers Shannon; unlike the (additive) Renyi entropy, S_q(A+B) != S_q(A) + S_q(B) for
independent parts. Completes the generalized-entropy pair (renyiEntropy additive + tsallisEntropy
non-additive); the two agree only at q = 1. Validated against NeuroKit2.entropy_tsallis
bit-for-bit (max |diff| ~9e-16) across q = {0.5, 1, 2, 3} on real eegmmidb POz EEG.renyiEntropy() — Renyi entropy (Renyi 1961): the order-alpha generalization of the Shannon
entropy of a signal's amplitude histogram, H_alpha = 1/(1-alpha) * ln(sum p^alpha) in nats.
alpha = 1 recovers Shannon, alpha = 2 is the collision entropy, alpha -> inf the min-entropy;
non-increasing in alpha. A generalized-entropy family distinct from the Shannon-based measures;
reproduces NeuroKit2.entropy_renyi bit-for-bit across alpha.petrosianFD() — Petrosian fractal dimension (Petrosian 1995): a fast O(N) waveform-complexity
index from the number of sign changes in the signal's derivative (local-extrema density). Smooth
oscillation → FD near 1; complex/noisy → higher. Complements svdEntropy() and eegComplexity();
reproduces antropy.petrosian_fd bit-for-bit (and, unlike the Higuchi/Katz FDs, has a single
unambiguous closed form).svdEntropy() — Singular Value Decomposition entropy (Roberts et al. 1999): time-delay embed a
signal, take the normalized singular values of the embedding matrix, and return their Shannon
entropy — a measure of the signal's dimensionality (low = structured/oscillatory, high =
complex/noise-like). A linear-algebraic complement to eegComplexity()'s entropy/fractal
measures; reproduces antropy.svd_entropy bit-for-bit (both via LAPACK SVD).test-eeg-timefreq.R runs 12× faster (368s → 31s) by
right-sizing the synthetic test data (n_time 5000 → 2000; ERSP/ITC n_epochs
40/20 → 12/10). Frequency grids and every assertion are unchanged, so coverage is
preserved (74 tests, all passing). The full package test suite now completes in
~227s (previously exceeded a 500s CI budget), all 1282 tests passing.eegICLabel(backend = "iclabel") runs the genuine trained ICLabel CNN
(Pion-Tonachini et al. 2019), replacing the need to trust the pure-R heuristic
when the real model is wanted. It delegates to the validated mne-icalabel
implementation through reticulate (carrying the PhysioEEG ICA mixing/unmixing
matrices into an MNE ICA object), so it uses mne-icalabel's exact EEGLAB-style
feature extraction and the trained weights rather than re-porting the network
natively (which would risk a plausible-but-wrong result). The default
backend = "heuristic" is unchanged and needs no Python; the trained backend
is optional (needs reticulate + a Python env with mne and mne-icalabel,
and standard 10-20/10-10 channel labels for the scalp map). Verified to return
valid 7-class probability distributions from the real network.eegSourceEstimate(method = "dspm") adds dSPM (dynamic statistical
parametric mapping; Dale et al. 2000): the minimum-norm estimate
noise-normalized by each source's projected noise sensitivity
(sqrt(diag(K K')) for an identity noise covariance). Verified to be MNE
scaled per source by a time-invariant factor.eegDipoleFit() adds equivalent-current-dipole (ECD) fitting — the focal
complement to the distributed inverses. It localizes the single dipole that
best explains a scalp topography (grid search inside the head sphere refined
with Nelder-Mead; the dipole moment is the closed-form least-squares fit at
each position), using the same forward physics as eegForwardModel().
Verified to recover a planted dipole's position (< 0.02 head radii),
orientation, and > 99.9% goodness of fit. Fits the peak global-field-power
sample by default, or a chosen sample / window.eegSurfaceLaplacian() adds the surface Laplacian / current source density
(CSD) of Perrin et al. (1989) — the spherical-spline scalp Laplacian (Kayser &
Tenke 2006). CSD is reference-free and a spatial high-pass, deblurring volume
conduction so each channel reflects the radial current beneath it. Verified on
its defining properties: invariance to a reference constant (the spline
constant term absorbs it) and spatial-high-pass behaviour (focal topographies
are emphasized over smooth ones ~8x). Reuses the .legendre_poly recurrence
and standard 10-10/10-20 position tables; needs electrode positions
(colData pos_x/pos_y/pos_z, else matched to a standard montage by label).Three research-grade method families that were missing from the EEG stack.
eegComplexity() adds the nonlinear / complexity family (previously absent
ecosystem-wide for EEG): per-channel sample & approximate entropy
(Richman–Moorman, Pincus), permutation entropy (Bandt–Pompe), multiscale
entropy (Costa), Lempel–Ziv complexity, Higuchi & Katz fractal dimension,
detrended fluctuation analysis (alpha), Hurst (R/S), Hjorth parameters, and
spectral entropy. The numeric cores are validated against known values (white
noise Higuchi FD → 2, Brownian → 1.5; white-noise DFA/Hurst → 0.5). Entropy
measures are O(N^2) and cap long channels via max_samples.eegAperiodic() adds aperiodic / 1-f spectral parameterization
(specparam / FOOOF; Donoghue 2020): per-channel aperiodic exponent / offset /
knee plus separated oscillatory peaks, ready for a topomap or a qEEG
biomarker. Delegates the fit to PhysioAnalysis::specparam().eegPAC() and eegComodulogram() add phase-amplitude / cross-frequency
coupling (Tort modulation index, Canolty mean-vector-length, Ozkurt, PLV),
within a channel or across two channels, plus the comodulogram grid.
Delegate the estimators to PhysioCrossModal::phaseAmplitudeCoupling() /
comodulogram().These reuse the existing specparam and PAC engines (new PhysioAnalysis Suggests;
PhysioCrossModal already suggested) rather than reimplementing them, and add the
genuinely new complexity module natively. No existing behaviour changed.
make_eeg_bci() now pads channel labels with generic names when more channels than the eight-entry motor/occipital pool are requested (previously n_channels > 8 produced NA labels, which made the per-channel artifact tests error with "missing value where TRUE/FALSE needed").bci-classification, connectivity-analysis, preprocessing-pipeline, sleep-analysis, and time-frequency-analysis vignettes were modernized to the current package API. They had drifted from the code (stale/renamed arguments and functions, changed return structures, and 2D-vs-3D data-shape assumptions) and no longer ran. Fixes attach SummarizedExperiment, use the current make_eeg*() signatures and the real accessor/analysis functions (eegFilter(method=), eegRereference, eegMontage, eegBadChannels, eegInterpolate, eegICA, eegMorletWavelet, eegSTFT, eegSleepStage, the spindle/K-complex/slow-wave detectors, etc.), and read time-frequency/staging output from metadata(). All package vignettes now run clean under R CMD check. No package behaviour changed.