# Using the provided example data set:
phoenix_respiratory(
pf_ratio = pao2 / fio2,
sf_ratio = spo2 / fio2,
imv = vent,
other_respiratory_support = as.integer(fio2 > 0.21),
data = sepsis
)
# A set of values that will get all possible respiratory scores:
DF <- expand.grid(
pfr = c(NA, 500, 400, 350, 200, 187, 100, 56),
sfr = c(NA, 300, 292, 254, 220, 177, 148, 76),
vent = c(NA, 0, 1),
o2 = c(NA, 0, 1)
)
phoenix_respiratory(
pf_ratio = pfr,
sf_ratio = sfr,
imv = vent,
other_respiratory_support = o2,
data = DF
)
Run the code above in your browser using DataLab