bp: Blood Pressure Analysis in R

John Schwenck, Irina GaynanovaOpenalex Unknown 2021 · DOI · OpenAlex

Introduction

Blood pressure (BP) data analysis is often hindered by heterogeneous data formats and the complexity of calculating clinically relevant metrics. The bp package for R addresses these challenges by providing a comprehensive, unified toolkit for the preprocessing, analysis, and visualization of BP data. By automating the calculation of variability metrics and nocturnal dipping patterns, it facilitates standardized and reproducible cardiovascular research workflows.

Methodological Pillars

The bp package is designed around a "tidy" data philosophy, focusing on several key methodological areas:

Standardized Preprocessing

The process_data function serves as a universal translator, converting raw datasets from various sources—such as Ambulatory Blood Pressure Monitoring (ABPM), Home Blood Pressure Monitoring (HBPM), and continuous Arterial Pressure (AP) waveforms—into a unified format. It identifies systolic (SBP), diastolic (DBP), and heart rate (HR) columns while managing date-time stamps to ensure consistency across analyses.

Advanced Variability Metrics

Moving beyond simple mean values, the package implements metrics that account for the temporal structure of BP data. Average Real Variability (ARV) and Successive Variation (SV) calculate the average difference between successive readings. This approach recognizes that the sequence of measurements is vital; a jump from 120 to 150 mmHg is more clinically significant than two stable readings at 135 mmHg.

Standardized function arguments for blood pressure variability metrics.

Automated Classification and Nocturnal Analysis

The package includes functions like bp_stages to categorize readings into eight hypertension levels based on the latest clinical guidelines. Furthermore, specialized functions like dip_calc and bp_sleep_metrics analyze the "dipping" phenomenon—the physiological drop in BP during sleep. This is critical for identifying high-risk patients, such as "extreme dippers" or "non-dippers," both of whom face higher mortality risks than normal dippers.

Data Diversity

The package includes several diverse datasets for benchmarking and demonstration, ranging from pediatric data (bp_children) and clinical trials in Ghana (bp_ghana) to high-frequency (100 Hz) arterial waveforms in salt-sensitive rats (bp_rats). This diversity demonstrates the package's versatility across different research contexts and species.

Results and Visualization

The bp package successfully unifies HBPM, ABPM, and AP data into a single framework. It supports automatic calculation of over seven sleep-related metrics (e.g., sleep-through morning surge) and provides high-level wrappers for ggplot2 (e.g., bp_scatter, bp_ts_plots). Additionally, the bp_report function generates comprehensive multi-paneled PDF reports, serving as a powerful tool for science communication within clinical and laboratory settings.

Limitations and Future Directions

The accuracy of nocturnal metrics depends heavily on the identification of sleep intervals, which currently relies on user-supplied data or actigraphy. Furthermore, the package is undergoing continuous refinement to ensure a consistent naming convention and to stay aligned with evolving clinical guidelines.

Legacy argument structure illustrating the package's API evolution.

The transition from numeric codes (as seen in earlier iterations) to more descriptive string arguments for parameters like bp_type reflects the package's move toward a more intuitive and standardized API, ensuring long-term maintainability and ease of use for researchers.

Summary updated

BibTeX
@inproceedings{schwenck2021bp,
  author = {John Schwenck and Irina Gaynanova},
  title = {{bp: Blood Pressure Analysis in R}},
  booktitle = {Openalex Unknown},
  year = {2021},
  doi = {10.32614/cran.package.bp},
}
Figure