Skip to content

Commit 539dc2d

Browse files
committed
Update label indentation
1 parent ec1631d commit 539dc2d

File tree

3 files changed

+40
-39
lines changed

3 files changed

+40
-39
lines changed

R/fda-table_38.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ make_table_38 <- function(adae,
8787
vars = pref_var,
8888
riskdiff = !is.null(risk_diff)
8989
) %>%
90-
append_topleft(paste(" ", lbl_pref_var))
90+
append_topleft(paste(" ", lbl_pref_var))
9191

9292
tbl <- build_table(lyt, df = adae, alt_counts_df = alt_counts_df)
9393
if (prune_0) tbl <- prune_table(tbl)

tests/testthat/_snaps/fda-table_38.md

+37-37
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
Code
44
res
55
Output
6-
Body System or Organ Class
7-
FMQ (Broad) A: Drug X B: Placebo C: Combination
8-
Dictionary-Derived Term (N=134) (N=134) (N=132)
9-
—————————————————————————————————————————————————————————————————————
10-
cl B.2
11-
FMQ1 20 (14.9%) 17 (12.7%) 22 (16.7%)
12-
dcd B.2.2.3.1 20 (14.9%) 17 (12.7%) 22 (16.7%)
13-
FMQ2 22 (16.4%) 25 (18.7%) 21 (15.9%)
14-
dcd B.2.2.3.1 22 (16.4%) 25 (18.7%) 21 (15.9%)
15-
FMQ3 18 (13.4%) 24 (17.9%) 23 (17.4%)
16-
dcd B.2.2.3.1 18 (13.4%) 24 (17.9%) 23 (17.4%)
17-
cl C.1
18-
FMQ1 14 (10.4%) 19 (14.2%) 21 (15.9%)
19-
dcd C.1.1.1.3 14 (10.4%) 19 (14.2%) 21 (15.9%)
20-
FMQ2 17 (12.7%) 22 (16.4%) 19 (14.4%)
21-
dcd C.1.1.1.3 17 (12.7%) 22 (16.4%) 19 (14.4%)
22-
FMQ3 20 (14.9%) 16 (11.9%) 19 (14.4%)
23-
dcd C.1.1.1.3 20 (14.9%) 16 (11.9%) 19 (14.4%)
6+
Body System or Organ Class
7+
FMQ (Broad) A: Drug X B: Placebo C: Combination
8+
Dictionary-Derived Term (N=134) (N=134) (N=132)
9+
—————————————————————————————————————————————————————————————————————
10+
cl B.2
11+
FMQ1 20 (14.9%) 17 (12.7%) 22 (16.7%)
12+
dcd B.2.2.3.1 20 (14.9%) 17 (12.7%) 22 (16.7%)
13+
FMQ2 22 (16.4%) 25 (18.7%) 21 (15.9%)
14+
dcd B.2.2.3.1 22 (16.4%) 25 (18.7%) 21 (15.9%)
15+
FMQ3 18 (13.4%) 24 (17.9%) 23 (17.4%)
16+
dcd B.2.2.3.1 18 (13.4%) 24 (17.9%) 23 (17.4%)
17+
cl C.1
18+
FMQ1 14 (10.4%) 19 (14.2%) 21 (15.9%)
19+
dcd C.1.1.1.3 14 (10.4%) 19 (14.2%) 21 (15.9%)
20+
FMQ2 17 (12.7%) 22 (16.4%) 19 (14.4%)
21+
dcd C.1.1.1.3 17 (12.7%) 22 (16.4%) 19 (14.4%)
22+
FMQ3 20 (14.9%) 16 (11.9%) 19 (14.4%)
23+
dcd C.1.1.1.3 20 (14.9%) 16 (11.9%) 19 (14.4%)
2424

2525
# Table 38 generation works with custom values
2626

@@ -33,7 +33,7 @@
3333
————————————————————————————————————————————————————————————————————————
3434
Body System or Organ Class(3)
3535
FMQ (Narrow) A: Drug X B: Placebo C: Combination
36-
Dictionary-Derived Term (N=134) (N=134) (N=132)
36+
Dictionary-Derived Term (N=134) (N=134) (N=132)
3737
————————————————————————————————————————————————————————————————————————
3838
cl A.1
3939
FMQ1 32 (23.9%) 29 (21.6%) 48 (36.4%)
@@ -99,22 +99,22 @@
9999
Code
100100
res
101101
Output
102-
Body System or Organ Class
103-
FMQ (Broad) A: Drug X B: Placebo C: Combination Risk Difference (%) (95% CI)
104-
Dictionary-Derived Term (N=134) (N=134) (N=132) (N=268)
105-
————————————————————————————————————————————————————————————————————————————————————————————————————
106-
cl B.2
107-
FMQ1 20 (14.9%) 17 (12.7%) 22 (16.7%) -2.2 (-10.5 - 6.0)
108-
dcd B.2.2.3.1 20 (14.9%) 17 (12.7%) 22 (16.7%) -2.2 (-10.5 - 6.0)
109-
FMQ2 22 (16.4%) 25 (18.7%) 21 (15.9%) 2.2 (-6.9 - 11.3)
110-
dcd B.2.2.3.1 22 (16.4%) 25 (18.7%) 21 (15.9%) 2.2 (-6.9 - 11.3)
111-
FMQ3 18 (13.4%) 24 (17.9%) 23 (17.4%) 4.5 (-4.2 - 13.2)
112-
dcd B.2.2.3.1 18 (13.4%) 24 (17.9%) 23 (17.4%) 4.5 (-4.2 - 13.2)
113-
cl C.1
114-
FMQ1 14 (10.4%) 19 (14.2%) 21 (15.9%) 3.7 (-4.1 - 11.6)
115-
dcd C.1.1.1.3 14 (10.4%) 19 (14.2%) 21 (15.9%) 3.7 (-4.1 - 11.6)
116-
FMQ2 17 (12.7%) 22 (16.4%) 19 (14.4%) 3.7 (-4.7 - 12.2)
117-
dcd C.1.1.1.3 17 (12.7%) 22 (16.4%) 19 (14.4%) 3.7 (-4.7 - 12.2)
118-
FMQ3 20 (14.9%) 16 (11.9%) 19 (14.4%) -3.0 (-11.1 - 5.2)
119-
dcd C.1.1.1.3 20 (14.9%) 16 (11.9%) 19 (14.4%) -3.0 (-11.1 - 5.2)
102+
Body System or Organ Class
103+
FMQ (Broad) A: Drug X B: Placebo C: Combination Risk Difference (%) (95% CI)
104+
Dictionary-Derived Term (N=134) (N=134) (N=132) (N=268)
105+
————————————————————————————————————————————————————————————————————————————————————————————————————
106+
cl B.2
107+
FMQ1 20 (14.9%) 17 (12.7%) 22 (16.7%) -2.2 (-10.5 - 6.0)
108+
dcd B.2.2.3.1 20 (14.9%) 17 (12.7%) 22 (16.7%) -2.2 (-10.5 - 6.0)
109+
FMQ2 22 (16.4%) 25 (18.7%) 21 (15.9%) 2.2 (-6.9 - 11.3)
110+
dcd B.2.2.3.1 22 (16.4%) 25 (18.7%) 21 (15.9%) 2.2 (-6.9 - 11.3)
111+
FMQ3 18 (13.4%) 24 (17.9%) 23 (17.4%) 4.5 (-4.2 - 13.2)
112+
dcd B.2.2.3.1 18 (13.4%) 24 (17.9%) 23 (17.4%) 4.5 (-4.2 - 13.2)
113+
cl C.1
114+
FMQ1 14 (10.4%) 19 (14.2%) 21 (15.9%) 3.7 (-4.1 - 11.6)
115+
dcd C.1.1.1.3 14 (10.4%) 19 (14.2%) 21 (15.9%) 3.7 (-4.1 - 11.6)
116+
FMQ2 17 (12.7%) 22 (16.4%) 19 (14.4%) 3.7 (-4.7 - 12.2)
117+
dcd C.1.1.1.3 17 (12.7%) 22 (16.4%) 19 (14.4%) 3.7 (-4.7 - 12.2)
118+
FMQ3 20 (14.9%) 16 (11.9%) 19 (14.4%) -3.0 (-11.1 - 5.2)
119+
dcd C.1.1.1.3 20 (14.9%) 16 (11.9%) 19 (14.4%) -3.0 (-11.1 - 5.2)
120120

tests/testthat/test-fda-table_38.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ test_that("Table 38 generation works with custom values", {
3131
),
3232
main_footer = paste(
3333
"Source: [include Applicant source, datasets and/or software tools used]\n",
34-
"(1) Duration = [e.g., X week double-blind treatment period or median and a range indicating pooled trial durations].\n",
34+
"(1) Duration = [e.g., X week double-blind treatment period or median and a range indicating pooled trial",
35+
"durations].\n",
3536
"(2) Treatment-emergent adverse event defined as [definition]. MedDRA version X.\n",
3637
"(3) Each FMQ is aligned to a single SOC based on clinical judgment. However,\n",
3738
"please be aware that some FMQs may contain PTs from more than one SOC."

0 commit comments

Comments
 (0)