Skip to content

Commit b554cfd

Browse files
committed
push
1 parent 6a626ee commit b554cfd

File tree

6 files changed

+160
-197
lines changed

6 files changed

+160
-197
lines changed

R/fda-table_32.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ make_table_32 <- function(df,
4242
tbl_summary(
4343
by = arm_var,
4444
statistic = list(all_categorical() ~ "{n} ({p}%)"),
45-
digits = everything() ~ c(0, 1),
45+
digits = list(all_continuous() ~ c(0, 1), all_categorical() ~ c(0, 1)),
4646
missing = "no"
4747
) %>%
4848
modify_header(label ~ paste0("**Diastolic Blood Pressure (", avalu, ")**")) %>%

R/fda-table_33.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ make_table_33 <- function(df,
4343
tbl_summary(
4444
by = arm_var,
4545
statistic = list(all_categorical() ~ "{n} ({p}%)"),
46-
digits = everything() ~ c(0, 1),
46+
digits = list(all_continuous() ~ c(0, 1), all_categorical() ~ c(0, 1)),
4747
missing = "no"
4848
) |>
4949
modify_header(label ~ paste0("**Diastolic Blood Pressure (", avalu, ")**")) |>

tests/testthat/_snaps/fda-table_32.md

+52
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,31 @@
9797
Output
9898
9999

100+
---
101+
102+
Code
103+
res
104+
Output
105+
Table 32. Percentage of Patients With Maximum Diastolic Blood Pressure by Category
106+
of Blood Pressure Postbaseline, Safety Population, Pooled Analysis
107+
108+
———————————————————————————————————————————————————————————————————————————————————
109+
Total
110+
Diastolic Blood Pressure A: Drug X C: Combination B: Placebo Population
111+
(Pa) (N=134) (N=132) (N=134) (N=400)
112+
———————————————————————————————————————————————————————————————————————————————————
113+
<60 0 0 0 0
114+
>60 134 (100%) 132 (100%) 134 (100%) 400 (100%)
115+
>90 134 (100%) 131 (99.2%) 134 (100%) 399 (99.8%)
116+
>110 123 (91.8%) 107 (81.1%) 111 (82.8%) 341 (85.2%)
117+
>=120 88 (65.7%) 76 (57.6%) 70 (52.2%) 234 (58.5%)
118+
———————————————————————————————————————————————————————————————————————————————————
119+
120+
Source: [include Applicant source, datasets and/or software tools used].
121+
122+
Abbreviations: CI, confidence interval; n, number of patients with indicated blood pressure;
123+
N, number of patients in treatment arm with available blood pressure data
124+
100125
# Table 32 generation missing values and ADSL
101126

102127
Code
@@ -136,3 +161,30 @@
136161
Output
137162
138163

164+
# Table 32 generation works with pruned rows
165+
166+
Code
167+
res
168+
Output
169+
Diastolic Blood Pressure A: Drug X C: Combination B: Placebo
170+
(Pa) (N=134) (N=132) (N=134)
171+
—————————————————————————————————————————————————————————————————————
172+
>60 134 (100%) 132 (100%) 134 (100%)
173+
>90 134 (100%) 131 (99.2%) 134 (100%)
174+
>110 123 (91.8%) 107 (81.1%) 111 (82.8%)
175+
>=120 88 (65.7%) 76 (57.6%) 70 (52.2%)
176+
177+
# Table 32 generation works with risk difference column
178+
179+
Code
180+
res
181+
Output
182+
Diastolic Blood Pressure A: Drug X C: Combination B: Placebo Risk Difference (%) (95% CI)
183+
(Pa) (N=134) (N=132) (N=134) (N=268)
184+
————————————————————————————————————————————————————————————————————————————————————————————————————
185+
<60 0 0 0 0.0 (0.0 - 0.0)
186+
>60 134 (100%) 132 (100%) 134 (100%) 0.0 (0.0 - 0.0)
187+
>90 134 (100%) 131 (99.2%) 134 (100%) 0.0 (0.0 - 0.0)
188+
>110 123 (91.8%) 107 (81.1%) 111 (82.8%) -9.0 (-16.9 - -1.1)
189+
>=120 88 (65.7%) 76 (57.6%) 70 (52.2%) -13.4 (-25.1 - -1.8)
190+

0 commit comments

Comments
 (0)