lenstay: Calculate the length of stay in the ICU.

View source: R/demographics.R

lenstayR Documentation

Calculate the length of stay in the ICU.

Description

Calculate the length of stay in the ICU and append it to the original demographic table.

Usage

lenstay(demg, units = "hours")

Arguments

demg

data.table the demographic table which should at least contain column DAICU and DDICU

units

character The unit of lenstay column, by default the output will be in hours

Value

data.table It is the original data.table with lenstay column (in difftime) appended.


ropensci/cleanEHR documentation built on Aug. 28, 2022, 8:31 p.m.