@examples added or corrected across 22 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.importFrom(stats, embed) was in NAMESPACE with no backing roxygen tag, so
regenerating would have dropped it silently. The tag is now in the source.coordinationNetwork(): a single entry point over the four inter-muscle
connectivity estimators (emgCoherenceNetwork(),
emgPartialCoherenceNetwork(), emgWPLINetwork(), emgDirectedGCNetwork()),
building the coordination network of a multi-muscle recording with a chosen
method and routing the relevant parameters (spectral window, wPLI debiasing,
Granger model order) to the underlying estimator.splitHalfStability(): split-half reproducibility of inter-muscle coordination
networks -- split the recording, build a coordinationNetwork() on each half
with each estimator, and correlate edge weights and node strengths between the
halves, to tell real coordination structure from a split-specific artefact.emgADLActivation(): EMG muscle-activation summary of an ADL task -- the
agonist/antagonist co-contraction index (guarded/inefficient movement), each
muscle's peak and mean activation (percent-MVC when a maximal reference is
given) and its active-time fraction -- labelled with the ICF code the task
realises. Answers HOW a task is performed, complementing the clinical scales.R/emg-synergy-mixture.R):
muscleSynergyMixture() fits a mixture of factor analysers to per-subject
muscle activation to identify subgroups of subjects with distinct synergy
structure (each cluster's loadings = that subgroup's synergies), instead of a
single global model. A single-function distillation of the method in the
synergyMixR package (Matsui); algorithm after Ghahramani & Hinton (1996).R/emg-convolutive.R):
convolutiveSynergy() extracts shift-invariant muscle x time spatiotemporal
synergy templates by convolutive NMF (d'Avella & Bizzi 2003; Smaragdis 2004) —
the temporal-structure complement to spatial NMF and the trial-mode tensor.R/emg-tensor.R):
muscleSynergyTensor() — non-negative CANDECOMP/PARAFAC of a
muscle x time x trial EMG tensor (each synergy = muscle weights x temporal
profile x per-trial loading), the multiway generalisation of spatial-NMF
muscle synergies.muscleSynergyTensorOrder() — VAF-threshold selection of the synergy count.emg-analysis vignette now envelopes the MVC reference trial before MVC amplitude normalization, so both the working data and the reference carry the "envelope" assay that emgAmplitudeNormalize() reads. The vignette now runs clean. No functional change to the package.emgEnvelope() now records a W3C-PROV provenance activity (via the shared
.recordProv helper, matching the PhysioPreprocess pattern), so the envelope
step is visible to the reproducibility substrate's run-tracing. No change to
the computed envelope.emgOnsetDetect() now applies the rectify-and-smooth conditioning of the
published methods before thresholding: the rectified signal ("hodges_bui")
or rectified Teager-Kaiser trace ("teager_kaiser") is smoothed with a
centered moving average controlled by the new smooth_ms argument
(default 25 ms, in the 10--50 ms range examined by Hodges & Bui 1996;
smooth_ms = 0 restores the previous behavior). Previously the threshold
was applied to the unsmoothed rectified trace, which dips below threshold
at every carrier zero-crossing, so contiguous suprathreshold runs almost
never reached min_duration_ms and both threshold methods failed to
detect genuine band-limited bursts (zero detections at SNR 20 dB); the
statistical "bonato" and "aglr" detectors were unaffected.Initial release as a standalone package in the x-biosignal ecosystem,
split from the PhysioExperiment monorepo. PhysioEMG provides
electromyography (EMG) analysis for PhysioExperiment objects, spanning
amplitude, timing, spectral fatigue, muscle synergy, and inter-muscular
network methods.
emgEnvelope() extracts the amplitude envelope via sliding-window RMS
(O(1) prefix-sum implementation), the Hilbert analytic signal, or
rectification with a moving-average lowpass filter.emgAmplitudeNormalize() normalizes amplitude to maximum voluntary
contraction (MVC) or within-trial peak.emgOnsetDetect() detects activation onsets and offsets using the
Hodges-Bui baseline-SD threshold or the Teager-Kaiser energy operator,
with a minimum-duration gate to reject spurious bursts.emgFatigue() tracks windowed median and mean frequency plus RMS
amplitude to characterize myoelectric fatigue.emgFatigueIndex() summarizes fatigue as the final-to-initial median
frequency ratio.emgSpectralMoments() computes spectral moments (M0, M1, M2) over
sliding windows.muscleSynergy() factorizes multi-channel EMG into synergies via NMF,
PCA, or ICA, reporting weight and activation matrices with
variance-accounted-for (VAF).synergyReconstruct() rebuilds signals from a chosen number of
synergies, and synergyCompare() best-match pairs and correlates two
synergy solutions.emgCoherenceNetwork() (Welch
magnitude-squared coherence), emgPartialCoherenceNetwork() (partial
coherence from the inverse cross-spectral matrix), and
emgWPLINetwork() (weighted phase-lag index, with an optional
debiased estimator).emgDirectedGCNetwork() using pairwise
Granger causality (F-statistic or delta-R-squared scoring, with
p-values).emgDynamicWaveletNetwork() using Morlet
wavelet coherence in sliding windows with cone-of-influence masking.emgCoordinationStructure() summarizes network topology (module
detection, weighted modularity, efficiency, clustering, participation
and within-module z-scores).emgInterpretNetworkKG() ranks and annotates high-weight edges with
optional node metadata and knowledge-graph links.make_emg(),
make_emg_contraction(), and make_emg_fatigue().emgEnvelope() for accurate
windowed amplitude estimates.