Skip to content

Commit

Permalink
push
Browse files Browse the repository at this point in the history
  • Loading branch information
aassuied-ps committed Nov 19, 2024
1 parent 6a626ee commit b554cfd
Show file tree
Hide file tree
Showing 6 changed files with 160 additions and 197 deletions.
2 changes: 1 addition & 1 deletion R/fda-table_32.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ make_table_32 <- function(df,
tbl_summary(
by = arm_var,
statistic = list(all_categorical() ~ "{n} ({p}%)"),
digits = everything() ~ c(0, 1),
digits = list(all_continuous() ~ c(0, 1), all_categorical() ~ c(0, 1)),
missing = "no"
) %>%
modify_header(label ~ paste0("**Diastolic Blood Pressure (", avalu, ")**")) %>%
Expand Down
2 changes: 1 addition & 1 deletion R/fda-table_33.R
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ make_table_33 <- function(df,
tbl_summary(
by = arm_var,
statistic = list(all_categorical() ~ "{n} ({p}%)"),
digits = everything() ~ c(0, 1),
digits = list(all_continuous() ~ c(0, 1), all_categorical() ~ c(0, 1)),
missing = "no"
) |>
modify_header(label ~ paste0("**Diastolic Blood Pressure (", avalu, ")**")) |>
Expand Down
52 changes: 52 additions & 0 deletions tests/testthat/_snaps/fda-table_32.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,31 @@
Output

---

Code
res
Output
Table 32. Percentage of Patients With Maximum Diastolic Blood Pressure by Category
of Blood Pressure Postbaseline, Safety Population, Pooled Analysis
———————————————————————————————————————————————————————————————————————————————————
Total
Diastolic Blood Pressure A: Drug X C: Combination B: Placebo Population
(Pa) (N=134) (N=132) (N=134) (N=400)
———————————————————————————————————————————————————————————————————————————————————
<60 0 0 0 0
>60 134 (100%) 132 (100%) 134 (100%) 400 (100%)
>90 134 (100%) 131 (99.2%) 134 (100%) 399 (99.8%)
>110 123 (91.8%) 107 (81.1%) 111 (82.8%) 341 (85.2%)
>=120 88 (65.7%) 76 (57.6%) 70 (52.2%) 234 (58.5%)
———————————————————————————————————————————————————————————————————————————————————
Source: [include Applicant source, datasets and/or software tools used].
Abbreviations: CI, confidence interval; n, number of patients with indicated blood pressure;
N, number of patients in treatment arm with available blood pressure data

# Table 32 generation missing values and ADSL

Code
Expand Down Expand Up @@ -136,3 +161,30 @@
Output

# Table 32 generation works with pruned rows

Code
res
Output
Diastolic Blood Pressure A: Drug X C: Combination B: Placebo
(Pa) (N=134) (N=132) (N=134)
—————————————————————————————————————————————————————————————————————
>60 134 (100%) 132 (100%) 134 (100%)
>90 134 (100%) 131 (99.2%) 134 (100%)
>110 123 (91.8%) 107 (81.1%) 111 (82.8%)
>=120 88 (65.7%) 76 (57.6%) 70 (52.2%)

# Table 32 generation works with risk difference column

Code
res
Output
Diastolic Blood Pressure A: Drug X C: Combination B: Placebo Risk Difference (%) (95% CI)
(Pa) (N=134) (N=132) (N=134) (N=268)
————————————————————————————————————————————————————————————————————————————————————————————————————
<60 0 0 0 0.0 (0.0 - 0.0)
>60 134 (100%) 132 (100%) 134 (100%) 0.0 (0.0 - 0.0)
>90 134 (100%) 131 (99.2%) 134 (100%) 0.0 (0.0 - 0.0)
>110 123 (91.8%) 107 (81.1%) 111 (82.8%) -9.0 (-16.9 - -1.1)
>=120 88 (65.7%) 76 (57.6%) 70 (52.2%) -13.4 (-25.1 - -1.8)

Loading

0 comments on commit b554cfd

Please sign in to comment.