# Argument exclude_base_abn must be TRUE to include patients with normal or abnormal in the opposite# direction in the denom.# So for "High" direction, subjects with baseline grade 3-4 are not in the denom.lyt <-basic_table(show_colcounts =TRUE) %>%split_cols_by(var ="ARM") %>%add_overall_col("All Patients") %>%split_rows_by("PARCAT1",split_fun = drop_split_levels, label_pos ="topleft", split_label =obj_label(adlb$PARCAT1) ) %>%split_rows_by("PARAM",split_fun = drop_split_levels, label_pos ="topleft", split_label =obj_label(adlb$PARAM) ) %>%count_abnormal(var ="ANRIND",abnormal =list(Low ="LOW", High ="HIGH"),variables =list(id ="USUBJID", baseline ="BNRIND"),exclude_base_abn =TRUE,.indent_mods =4L ) %>%append_topleft(" Direction of Abnormality")result <-build_table(lyt, adlb, alt_counts_df = adsl)result
Category for Lab Test
Parameter A: Drug X B: Placebo C: Combination All Patients
Direction of Abnormality (N=134) (N=134) (N=132) (N=400)
———————————————————————————————————————————————————————————————————————————————————————————————————————————
CHEMISTRY
Alanine Aminotransferase Measurement
Low 32/127 (25.2%) 32/128 (25%) 32/128 (25%) 96/383 (25.1%)
High 0/134 0/134 0/132 0/400
C-Reactive Protein Measurement
Low 36/127 (28.3%) 36/127 (28.3%) 42/123 (34.1%) 114/377 (30.2%)
High 34/124 (27.4%) 33/128 (25.8%) 31/129 (24%) 98/381 (25.7%)
IMMUNOLOGY
Immunoglobulin A Measurement
Low 0/134 0/134 0/132 0/400
High 33/128 (25.8%) 32/124 (25.8%) 28/120 (23.3%) 93/372 (25%)
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. Alternatively, copy the code and click here to open WebR in a new tab.
result <-build_table(lyt, adlb_alt_cut, alt_counts_df = adsl)result
Category for Lab Test
Parameter A: Drug X B: Placebo C: Combination All Patients
Direction of Abnormality (N=134) (N=134) (N=132) (N=400)
———————————————————————————————————————————————————————————————————————————————————————————————————————————
CHEMISTRY
Alanine Aminotransferase Measurement
Low 46/119 (38.7%) 54/123 (43.9%) 47/127 (37%) 147/369 (39.8%)
High 0/134 0/134 0/132 0/400
C-Reactive Protein Measurement
Low 59/122 (48.4%) 56/118 (47.5%) 58/121 (47.9%) 173/361 (47.9%)
High 54/122 (44.3%) 46/122 (37.7%) 44/122 (36.1%) 144/366 (39.3%)
IMMUNOLOGY
Immunoglobulin A Measurement
Low 0/134 0/134 0/132 0/400
High 47/124 (37.9%) 54/120 (45%) 47/115 (40.9%) 148/359 (41.2%)
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. Alternatively, copy the code and click here to open WebR in a new tab.
Because the random.cdisc.data dataset adlb doesn’t have the PARCAT1 variable, this variable is created from LBCAT in pre-processing.
The current module tm_t_abnormality is only displaying rows that are not all-zero, so the result could be a little different from static output where all-zero rows can be shown.
Warning: `datanames<-()` was deprecated in teal.data 0.6.1.
ℹ invalid to use `datanames()<-` or `names()<-` on an object of class
`teal_data`. See ?names.teal_data
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.