lenstay: 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.