Skip to content

Commit

Permalink
progress
Browse files Browse the repository at this point in the history
  • Loading branch information
ddsjoberg committed Apr 29, 2024
1 parent eaf6fd9 commit 6c3edc2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
16 changes: 0 additions & 16 deletions tests/testthat/_snaps/add_p.tbl_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,3 @@
7 Tumor Response >0.9
8 Unknown <NA>

---

Code
as.data.frame(add_p(tbl_summary(trial, by = trt, include = c(age, marker,
response), type = all_continuous() ~ "continuous2"), group = response))
Output
**Characteristic** **Drug A** \nN = 98 **Drug B** \nN = 102 **p-value**
1 Age <NA> <NA> >0.9
2 Median (Q1, Q3) 46 (37, 60) 48 (39, 56) <NA>
3 Unknown 7 4 <NA>
4 Marker Level (ng/mL) <NA> <NA> 0.2
5 Median (Q1, Q3) 0.84 (0.23, 1.60) 0.52 (0.18, 1.21) <NA>
6 Unknown 6 4 <NA>
7 Tumor Response 28 (29%) 33 (34%) 0.5
8 Unknown 3 4 <NA>

6 changes: 0 additions & 6 deletions tests/testthat/test-add_p.tbl_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,4 @@ test_that("add_p.tbl_summary() creates output without error/warning for continuo
as.data.frame(col_labels = FALSE) |>
select(-all_stat_cols())
)

expect_snapshot(
tbl_summary(trial, by = trt, include = c(age, marker, response), type = all_continuous() ~ "continuous2") |>
add_p(group = response) |>
as.data.frame()
)
})

0 comments on commit 6c3edc2

Please sign in to comment.