lyt <-basic_table(title ="Extent of Exposure by Age Group and Gender: Safety-Evaluable Patients",main_footer ="* Patient Time is the sum of exposure across all patients in days.") %>%split_cols_by("SEX", split_fun =add_overall_level("Total", first =FALSE)) %>%summarize_patients_exposure_in_cols(var ="AVAL", col_split =TRUE,.labels =c(n_patients ="Number of Patients", sum_exposure ="Patient Time*"),custom_label ="Total Number of Patients and Patient Time" ) %>%analyze_patients_exposure_in_cols(var ="AGEGR1",col_split =FALSE ) %>%append_topleft(c("", "Age group (years)"))result <-build_table(lyt, df = anl, alt_counts_df = adsl_f)result
Extent of Exposure by Age Group and Gender: Safety-Evaluable Patients
--------------------------------------------------------------------------------------------------------------------------------------------------------
Female Male Total
Age group (years) Number of Patients Patient Time* Number of Patients Patient Time* Number of Patients Patient Time*
--------------------------------------------------------------------------------------------------------------------------------------------------------
Total Number of Patients and Patient Time 134 (58.0%) 12591 83 (49.1%) 8050 217 (54.2%) 20641
<65 134 (58.0%) 12591 82 (48.5%) 7970 216 (54.0%) 20561
>=65 0 (0.0%) 0 1 (0.6%) 80 1 (0.2%) 80
--------------------------------------------------------------------------------------------------------------------------------------------------------
* Patient Time is the sum of exposure across all patients in days.
Experimental use!
WebR is a tool allowing you to run R code in the web browser. Modify the code below and click run to see the results. Altenatively, copy the code and click here to open WebR in a new tab.
lyt <-basic_table(title ="Duration of Exposure: Safety-Evaluable Patients",main_footer ="* Patient Time is the sum of exposure across all patients in days.") %>%split_cols_by("SEX", split_fun =add_overall_level("Total", first =FALSE)) %>%summarize_patients_exposure_in_cols(var ="AVAL", col_split =TRUE,.labels =c(n_patients ="Number of Patients", sum_exposure ="Patient Time*"),custom_label ="Total Number of Patients and Patient Time" ) %>%analyze_patients_exposure_in_cols(var ="AGEGR2",col_split =FALSE ) %>%append_topleft(c("", "Age group (years)"))result <-build_table(lyt, df = anl, alt_counts_df = adsl_f) %>%prune_table()result
Duration of Exposure: Safety-Evaluable Patients
--------------------------------------------------------------------------------------------------------------------------------------------------------
Female Male Total
Age group (years) Number of Patients Patient Time* Number of Patients Patient Time* Number of Patients Patient Time*
--------------------------------------------------------------------------------------------------------------------------------------------------------
Total Number of Patients and Patient Time 134 (58.0%) 12591 83 (49.1%) 8050 217 (54.2%) 20641
18 - 40 118 (51.1%) 11203 60 (35.5%) 5787 178 (44.5%) 16990
41 - 64 16 (6.9%) 1388 22 (13.0%) 2183 38 (9.5%) 3571
>=65 0 (0.0%) 0 1 (0.6%) 80 1 (0.2%) 80
--------------------------------------------------------------------------------------------------------------------------------------------------------
* Patient Time is the sum of exposure across all patients in days.
Experimental use!
WebR is a tool allowing you to run R code in the web browser. Modify the code below and click run to see the results. Altenatively, copy the code and click here to open WebR in a new tab.
shinylive allow you to modify to run shiny application entirely in the web browser. Modify the code below and click re-run the app to see the results. The performance is slighly worse and some of the features (e.g. downloading) might not work at all.