Skip to content

Commit

Permalink
remove rbmi library load
Browse files Browse the repository at this point in the history
  • Loading branch information
gowerc committed Oct 1, 2024
1 parent db84f50 commit ecb2d29
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 0 additions & 3 deletions R/analyse.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@ analyse <- function(imputations, fun = ancova, delta = NULL, ..., .globals = TRU
"..rbmi..future..extract_imputed_df"
)
}
if (is.character(.packages)) {
c(.packages, "rbmi")
}

encap_analysis_fun <- function(x, ...) {
dat2 <- ..rbmi..future..extract_imputed_df(
Expand Down
12 changes: 12 additions & 0 deletions tests/testthat/test-parallel.R
Original file line number Diff line number Diff line change
Expand Up @@ -312,4 +312,16 @@ test_that("parallelisation of analyse() works as expected", {
)
})

# Check that manual library / global specification works if using rbmi function
system.time({
plan(multisession, workers = 2)
ana_obj_2 <- analyse(
impute_obj,
fun = ancova,
vars = new_vars,
.globals = c("ancova"),
.packages = "lubridate"
)
})

})

0 comments on commit ecb2d29

Please sign in to comment.