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)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.