PhysioAnalysis PhysioAnalysis logo

Analysis and Visualization for PhysioExperiment Objects

PhysioAnalysis provides 43 exported functions for spectral analysis, time-frequency decomposition, epoching, functional connectivity, statistical testing, and publication-quality visualization of multi-modal physiological signals. Built on PhysioCore, it operates directly on PhysioExperiment objects and covers the full analysis workflow from raw epochs to statistical inference and topographic visualization.

Installation

You can install PhysioAnalysis from r-universe:

# the containers build on Bioconductor, so its repositories are needed too
install.packages("BiocManager", repos = "https://cloud.r-project.org")
install.packages("PhysioAnalysis",
  repos = c("https://x-biosignal.r-universe.dev", BiocManager::repositories()))

Or install the development version from GitHub:

# install.packages("remotes", repos = "https://cloud.r-project.org")
remotes::install_github("x-biosignal/PhysioAnalysis")

Quick Start

library(PhysioAnalysis)

# Create sample EEG data with stimulus events
signal_matrix <- matrix(rnorm(2500 * 4), nrow = 2500, ncol = 4)
pe <- PhysioExperiment(
  assays = list(raw = signal_matrix),
  samplingRate = 250
)
pe <- addEvents(pe, onset = c(1, 3, 5, 7), duration = 0, type = "stimulus")

# Spectral power in standard frequency bands (delta..gamma)
power <- bandPower(pe)

# Epoch around stimulus events (-0.2 to 0.8 s)
pe_epoched <- epochData(pe, event_type = "stimulus", tmin = -0.2, tmax = 0.8)

# Compute the trial-averaged ERP
erp <- averageEpochs(pe_epoched)

# Visualize the event-related potential for the first channel
plotERP(pe_epoched, channel = 1)

Features

FFT and Spectral Analysis

Frequency-domain analysis and spectral decomposition:

Time-Frequency Analysis

Multi-resolution time-frequency decomposition:

Epoching

Trial segmentation and averaging:

Connectivity Analysis

Functional and effective connectivity metrics:

Statistical Testing

Parametric, non-parametric, and mass-univariate statistical methods:

Visualization

Publication-quality plots for physiological signal data:

Dependencies

PhysioExperiment Ecosystem

PhysioAnalysis is part of the PhysioExperiment ecosystem, a suite of R packages for multi-modal physiological signal analysis:

Package Description
PhysioCore Core data structures and accessors
PhysioIO File I/O (EDF, HDF5, BIDS, CSV, MAT)
PhysioPreprocess Signal preprocessing and artifact removal
PhysioAnalysis Spectral analysis, epoching, statistics, visualization
PhysioMoCap Motion capture data processing
PhysioOpenSim OpenSim biomechanical modeling integration

Visit the r-universe page to browse all available packages.

License

MIT License. See LICENSE for details.

Author

Yusuke Matsui

Governance & support

Part of the Physio ecosystem. Community and policy documents live in the umbrella repository: