R/makeHospitalTable.R

Defines functions makeHospitalTable

Documented in makeHospitalTable

#' makeHospitalTable
#'
#' @param df.table df.table
#' @param dates dates
#' @param UTI UTI
#'
#' @export
#'
makeHospitalTable <- function(df.table, dates, UTI = FALSE){
  hospital_table = plyr::ldply(dates,
                         function(date) cbind(data.frame(date = date),
                                               countByAgeClass(getCurrentInBed(df.table, date, UTI = UTI))))
  hospital_table[is.na(hospital_table)] = 0
  hospital_table
}
covid19br/now_fcts documentation built on Feb. 10, 2021, 9:42 a.m.