An educational R package 📦 for calculate various respiratory physiology parameters.

Installation

You can install the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("Lightbridge-KS/rslab")

Overview

rslab is an R package that contain functions for calculate respiratory physiology parameters in the following categories.

  • ATPS to BTPS converter: conversion of spirometry lung volume/flows from ATPS (Ambient Temperature and Pressure Saturated) to BTPS (Body Temperature, Pressure, water vapor Saturated)

  • Harvard Spirometer and Metabolic Rate & Oxygen Consumption:

    • Calculate metabolic rate and oxygen consumption O2 from Harvard Spirometer tracing, height and weight of the subject, and environmental conditions which are temperature and barometric pressure.
    • Simulate data to plot Harvard spirometer tracing from respiratory parameters such as oxygen consumption, tidal volume, respiratory rate, and random variation can also be added to give a more realistic plot.