inst/app/www/R_output/tab_1_table_antimicrobial.R

output$tab_1_table_antimicrobial <- renderDataTable({
  req(patients_filter())
  req(patients_filter() %>% nrow() > 1)
  
  dta <- patients_filter() %>%
    group_by(antimicrobial_class, antiname) %>%
    count() %>%
    mutate(`%` = round(100 * n / patients_filter() %>% nrow(), 1))
  
  datatable(dta, rownames = FALSE)
})
ocelhay/AMULaos documentation built on Oct. 29, 2020, 5:54 a.m.