henderson_hasselbalch: pH by Henderson Hasselbalch equation

Description Usage Arguments Examples

View source: R/acidbase.R

Description

Calculate the pH based on bicarbonate and partial pressure of CO2

Usage

1
henderson_hasselbalch(bicarbonate, pp_co2)

Arguments

bicarbonate

mmol/L

pp_co2

partial pressure of carbon dioxide in mmHg

Examples

1
2
3
4
5
6
7
8
 bicarbonate <- seq(10, 50, 5)
 pp_co2 <- seq(20, 70, 10)
 bc <- rep(bicarbonate, length(pp_co2))
 pp <- rep(pp_co2, each = length(bicarbonate))
 acidbase <- matrix(henderson_hasselbalch(bc, pp), nrow = 9, ncol = 6)
 rownames(acidbase) <- paste("bicarb", bicarbonate)
 colnames(acidbase) <- paste("PaCO2", pp_co2)
 acidbase

jackwasey/physiology documentation built on May 18, 2019, 7:59 a.m.