# NOT RUN {
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
# }
Run the code above in your browser using DataLab