Skip to content

Commit

Permalink
Update test case
Browse files Browse the repository at this point in the history
  • Loading branch information
fukuhiro2023 committed Aug 21, 2024
1 parent 27968c2 commit 4fbe312
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion man/extend_ae_specific_events.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions tests/testthat/test-independent-testing-avg_event.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,26 +59,26 @@ test_that("if par not NULL, return the average number of events in each group (t
by = dplyr::join_by(par)
) |>
dplyr::select(par, starts_with("avg")) |>
dplyr::arrange(par) |>
dplyr::select(-par)
names(avg) <- sub(x = names(avg), pattern = "avg_", replacement = "")

se <- dplyr::left_join(data.frame(par = unique(r2rtf_adae$AEDECOD)),
tmp,
by = dplyr::join_by(par)
) |>
dplyr::select(par, starts_with("se"))
dplyr::select(par, starts_with("se")) |>
dplyr::arrange(par)
names(se) <- sub(x = names(se), pattern = "se_", replacement = "")

count <- dplyr::left_join(data.frame(par = unique(r2rtf_adae$AEDECOD)),
tmp,
by = dplyr::join_by(par)
) |>
dplyr::select(par, starts_with("count"))
dplyr::select(par, starts_with("count")) |>
dplyr::arrange(par)
names(count) <- sub(x = names(count), pattern = "count_", replacement = "")

# check to make sure that order of output is the same as input (par)
expect_equal(se$par, unique(r2rtf_adae$AEDECOD))

avg1 <- list(
avg = avg,
se = se |>
Expand Down

0 comments on commit 4fbe312

Please sign in to comment.