PhysioIO PhysioIO logo

I/O Functions for PhysioExperiment Objects

PhysioIO provides comprehensive file I/O capabilities for the PhysioExperiment ecosystem. With 50 exported functions, it supports reading and writing physiological signal data across all major formats used in neuroscience, rehabilitation, and clinical research -- including EDF/EDF+, HDF5, BIDS, CSV, MATLAB .mat, and RDS. It also integrates with DuckDB for efficient querying and management of large-scale physiological datasets.

Installation

You can install PhysioIO 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("PhysioIO",
  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/PhysioIO")

Quick Start

library(PhysioIO)

# PhysioIO ships a small WFDB record; read it into a PhysioExperiment object.
# Your own files read the same way: readEDF(), readBrainVision(), readMAT(), ...
record <- file.path(system.file("extdata", package = "PhysioIO"), "100")
pe <- readWFDB(record)
pe
#> PhysioExperiment with 5000 timepoints x 2 channels
#> Sampling rate: 360 Hz

# Write to HDF5 for out-of-memory analysis of large datasets
h5 <- tempfile(fileext = ".h5")
writePhysioHDF5(pe, h5)
pe_h5 <- readPhysioHDF5(h5)
isHDF5Backed(pe_h5)  # TRUE

# Native RDS serialization for fast save/load workflows
rds <- tempfile(fileext = ".rds")
writePhysio(pe, rds)
pe_rds <- readPhysio(rds)

Features

EDF/EDF+ Format

Full support for the European Data Format, the most widely used standard for polysomnography, EEG, and clinical recordings:

HDF5 Format

High-performance hierarchical data format with out-of-memory support for large datasets:

BIDS Format

Brain Imaging Data Structure support for standardized neuroimaging datasets:

CSV Format

Flexible CSV import and export for tabular physiological data and clinical metadata:

MATLAB .mat Format

Interoperability with MATLAB-based analysis pipelines:

RDS Format

Native R serialization for fast save/load workflows:

DuckDB Database Integration

Efficient database-backed storage and querying for large-scale studies (requires the optional duckdb package):

Dependencies

PhysioExperiment Ecosystem

PhysioIO is the I/O layer 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 Preprocessing (filters, ICA, resampling)
PhysioAnalysis Analysis and visualization

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: