Skip to content

Commit 767cf93

Browse files
authored
Merge pull request #91 from openpharma/dev
#86
2 parents 7b9cfe4 + 9505532 commit 767cf93

File tree

8 files changed

+23
-6
lines changed

8 files changed

+23
-6
lines changed

R/simaerep_plot.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,8 @@ plot_study <- function(df_visit,
500500
"study_id",
501501
"site_number",
502502
"alert_level_site",
503-
"alert_level_study")))
503+
"alert_level_study")),
504+
by = c("study_id", "site_number"))
504505
}
505506

506507

README.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Koneswarakantha, B., Adyanthaya, R., Emerson, J. et al. An Open-Source R Package
6060

6161
Koneswarakantha, B., Barmaz, Y., Ménard, T. et al. Follow-up on the Use of Advanced Analytics for Clinical Quality Assurance: Bootstrap Resampling to Enhance Detection of Adverse Event Under-Reporting. Drug Saf (2020). [https://doi.org/10.1007/s40264-020-01011-5](https://doi.org/10.1007/s40264-020-01011-5)
6262

63-
## Ressources
63+
## Resources
6464

6565
- [Slides PHUSE conference](https://phuse.s3.eu-central-1.amazonaws.com/Archive/2024/Connect/EU/Strasbourg/PRE_AR04.pdf)
6666
- [Article PHUSE conference](https://phuse.s3.eu-central-1.amazonaws.com/Archive/2024/Connect/EU/Strasbourg/PAP_AR04.pdf)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ of Advanced Analytics for Clinical Quality Assurance: Bootstrap
7272
Resampling to Enhance Detection of Adverse Event Under-Reporting. Drug
7373
Saf (2020). <https://doi.org/10.1007/s40264-020-01011-5>
7474

75-
## Ressources
75+
## Resources
7676

7777
- [Slides PHUSE
7878
conference](https://phuse.s3.eu-central-1.amazonaws.com/Archive/2024/Connect/EU/Strasbourg/PRE_AR04.pdf)

cran-comments.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# submission simaerep v0.7.0
22

3+
## Resubmission
4+
5+
- long running tests using duckdb are now skipped_on_cran
6+
37
## Test Results
48

59
No notes, warnings or errors

inst/WORDLIST

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Innov
1818
Lifecycle
1919
Modelling
2020
Ménard
21+
PHUSE
2122
RBQM
2223
Regul
2324
Saf
@@ -78,7 +79,7 @@ purrr
7879
pval
7980
pvalue
8081
quALity
81-
reporducibly
82+
reproducibly
8283
rmarkdown
8384
rnorm
8485
rpois
-108 Bytes
Loading

tests/testthat/test_event_names.R

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ test_that("sim_test_data_study() produces the expected output for n_ae, regardle
3636
ae_rates_test_sd <- sim_test_data_events %>%
3737
filter(visit %in% c(1, 2)) %>%
3838
group_by(site_number, patnum) %>%
39-
summarise(stdev = sd(n_ae))
39+
summarise(stdev = sd(n_ae), .groups = "drop")
40+
4041
expect_true(unique(ae_rates_test_sd[["stdev"]]) == 0
4142
& length(unique(ae_rates_test_sd[["stdev"]])) == 1)
4243

@@ -178,14 +179,19 @@ test_that("plot.simaerep works with event_names", {
178179
expect_s3_class(plot(aerep, what = "ur", study = "A", plot_event = "y"), "ggplot")
179180
expect_s3_class(plot(aerep, what = "ur", study = "A", plot_event = events), "ggplot")
180181

181-
expect_s3_class(plot(aerep, what = "med75", study = "A", plot_event = events), "ggplot")
182+
expect_s3_class(
183+
plot(aerep, what = "med75", study = "A", plot_event = events, verbose = FALSE),
184+
"ggplot"
185+
)
182186

183187
})
184188

185189

186190

187191
test_that("event_names works with duckdb backend", {
188192

193+
skip_on_cran()
194+
189195
events <- c("x", "y")
190196

191197
suffix <- c(

tests/testthat/test_inframe.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ test_that("simaerep_inframe and simaerep_visit_med75 must have similar results",
115115

116116
test_that("simaerep_inframe must have identical counts and flags with duckdb backend", {
117117

118+
skip_on_cran()
119+
118120
df_eval_med75 <- simaerep(df_visit_test, inframe = TRUE, visit_med75 = TRUE)$df_eval
119121
df_eval <- simaerep(df_visit_test, inframe = TRUE, visit_med75 = FALSE)$df_eval
120122

@@ -195,6 +197,9 @@ test_that("p.adjust result near p_adjust_bh_inframe", {
195197
})
196198

197199
test_that("p.adjust result near p_adjust_bh_inframe with duckdb", {
200+
201+
skip_on_cran()
202+
198203
x <- rnorm(50, mean = c(rep(0, 500), rep(3, 500)))
199204
p <- 2 * pnorm(sort(-abs(x)))
200205

0 commit comments

Comments
 (0)