R/RcppExports.R

Defines functions compute_osi

# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Instantaneous Oxygen Saturation Index (OSI).
#'
#' \code{compute_osi} returns the instantaneous OSI per encounter, per
#' timestamp.
#'
#' OSI = 100 * Mean Airway Pressure * FiO2 / Pulse Oximetry,
#' where Meand Ariway Pressure and FiO2 are taken to be the most recent within
#' the last hour preceding Pulse Oximetry. Therefore, each returned OSI
#' will have the time correpsonding to the Pulse Oximetry measurement.
#'
#' @param df \code{data frame}: provides the variable values
#' \itemize{
#'    \item \code{chr:patient_id_encounter}
#'    \item \code{POSIXct:time} event timestamp, used as the timestamp for osi
#'    \item \code{num:FiO2}
#'    \item \code{num:Mean airway pressure (cmH2O)}
#'    \item \code{num:Pulse oximetry (\%)}
#'    \item \code{num:hour} time of event, in hours since episode start
#'    }
#'
#' @return data_frame:
#' \itemize{
#'    \item \code{chr:patient_id_encounter}
#'    \item \code{num:oxygen_saturation_index}
#'    \item \code{POSIXct:time}
#'    }
#'
compute_osi <- function(df) {
    .Call('icueval_compute_osi', PACKAGE = 'icueval', df)
}
jcasse/icueval documentation built on May 18, 2019, 9:20 p.m.