Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Example App** ```r data <- cdisc_data() |> within({ library(dplyr) library(nestcolor) set.seed(23) ADSL <- rADSL ADAE <- rADAE ADSL <- mutate(ADSL, DOSE = paste(sample(1:3, n(), replace = TRUE), "UG")) ADAE <- mutate( ADAE, flag1 = ifelse(AETOXGR == 1, 1, 0), flag2 = ifelse(AETOXGR == 2, 1, 0), flag3 = ifelse(AETOXGR == 3, 1, 0), flag1_filt = rep("Y", n()) ) }) datanames(data) <- c("ADSL", "ADAE") join_keys(data) <- default_cdisc_join_keys[datanames(data)] app <- init( data = data, modules = modules( tm_g_butterfly( label = "Butterfly Plot", dataname = "ADAE", right_var = choices_selected( selected = "SEX", choices = c("SEX", "ARM", "RACE") ), left_var = choices_selected( selected = "RACE", choices = c("SEX", "ARM", "RACE") ), category_var = choices_selected( selected = "AEBODSYS", choices = c("AEDECOD", "AEBODSYS") ), color_by_var = choices_selected( selected = "AETOXGR", choices = c("AETOXGR", "None") ), count_by_var = choices_selected( selected = "# of patients", choices = c("# of patients", "# of AEs") ), facet_var = choices_selected( selected = NULL, choices = c("RACE", "SEX", "ARM") ), sort_by_var = choices_selected( selected = "count", choices = c("count", "alphabetical") ), legend_on = TRUE, plot_height = c(600, 200, 2000) ) ) ) if (interactive()) { shinyApp(app$ui, app$server) } ```
- Loading branch information