* using log directory ‘/data/gannet/ripley/R/packages/tests-Suggests/doMIsaul.Rcheck’ * using R Under development (unstable) (2022-06-08 r82470) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘doMIsaul/DESCRIPTION’ ... OK * this is package ‘doMIsaul’ version ‘1.0.1’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... NOTE Package suggested but not available for checking: ‘CPE’ * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘doMIsaul’ can be installed ... [12s/12s] OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [17s/17s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking examples ... ERROR Running examples in ‘doMIsaul-Ex.R’ failed The error most likely occurred in: > ### Name: MImpute > ### Title: Wrapper functions for multivariate imputation with survival data > ### or left-censored data > ### Aliases: MImpute MImpute_surv MImpute_lcens MImpute_lcenssurv > > ### ** Examples > > data(cancer, package = "survival") > cancer.imp <- MImpute(cancer[, -c(1:3)], 2) > > ## MImpute_surv > data(cancer, package = "survival") > cancer$status <- cancer$status - 1 > cancer.imp <- MImpute_surv(cancer, 1) > > ## MImpute_lcens > toy <- iris[, 1:4] > # censor on variables 3 and 4, with LOD at quantile .1 and .2. > LODs <- toy[1, ] > LODs[1, ] <-c(NA, NA, quantile(toy[,3], .2), quantile(toy[,4], .1)) > # Censor indicator > Censored <- data.frame(Petal.Length = runif(150, 50,60), + Petal.Width = runif(150, 50,60)) > Censored[toy[,3] < LODs[1, 3], 1] <- LODs[1, 3] > Censored[toy[,4] < LODs[1, 4], 2] <- LODs[1, 4] > # NA for censored data > toy[toy[,3] < LODs[1, 3], 3] <- NA > toy[toy[,4] < LODs[1, 4], 4] <- NA > # Additional missing data > toy[sample(1:nrow(toy), 30), 1] <- NA > toy[sample(1:nrow(toy), 30), 3] <- NA > toy[sample(1:nrow(toy), 30), 4] <- NA > > toy.imp <- MImpute_lcens(data = toy, data.lod = Censored, standards = LODs, + mi.m = 1, mice.log = FALSE) Error in loadNamespace(x) : there is no package called ‘censReg’ Calls: MImpute_lcens ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart Execution halted * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ [18s/18s] [18s/18s] ERROR Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(doMIsaul) > > test_check("doMIsaul") Loading required namespace: mclust Failed with error: 'there is no package called 'mclust'' Loading required namespace: CPE Failed with error: 'there is no package called 'CPE'' Loading required namespace: mclust Failed with error: 'there is no package called 'mclust'' [ FAIL 4 | WARN 0 | SKIP 3 | PASS 35 ] ══ Skipped tests ═══════════════════════════════════════════════════════════════ • empty test (3) ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error (test-other.R:32:3): mi impute for censored ─────────────────────────── Error in `loadNamespace(x)`: there is no package called 'censReg' Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-other.R:32:2 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─doMIsaul::MImpute_lcens(...) 5. │ └─mice::mice(...) 6. │ └─mice:::sampler(...) 7. │ └─mice:::sampler.univ(...) 8. │ ├─base::do.call(f, args = args) 9. │ └─mice mice.impute.cens(...) 10. │ └─doMIsaul doMI.cens.draw3(y = yy, ry = ryy, x = x, lod.j = lod.j) 11. └─base::loadNamespace(x) 12. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL) 13. └─base withOneRestart(expr, restarts[[1L]]) 14. └─base doWithOneRestart(return(expr), restart) ── Error (test-output_tables.R:17:3): Output tables ──────────────────────────── Error in `loadNamespace(x)`: there is no package called 'reshape2' Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-output_tables.R:17:2 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─base::nrow(...) 5. ├─doMIsaul::table_categorical(...) 6. │ ├─base::do.call(...) 7. │ └─base::lapply(...) 8. │ └─doMIsaul FUN(X[[i]], ...) 9. └─base::loadNamespace(x) 10. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL) 11. └─base withOneRestart(expr, restarts[[1L]]) 12. └─base doWithOneRestart(return(expr), restart) ── Error (test-unsupMI.R:29:3): UnsupMI it self ──────────────────────────────── Error in `loadNamespace(x)`: there is no package called 'censReg' Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-unsupMI.R:29:2 2. │ └─testthat::quasi_label(enquo(object), label, arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─doMIsaul::unsupMI(...) 5. │ └─doMIsaul::MImpute_lcens(...) 6. │ └─mice::mice(...) 7. │ └─mice:::sampler(...) 8. │ └─mice:::sampler.univ(...) 9. │ ├─base::do.call(f, args = args) 10. │ └─mice mice.impute.cens(...) 11. │ └─doMIsaul doMI.cens.draw3(y = yy, ry = ryy, x = x, lod.j = lod.j) 12. └─base::loadNamespace(x) 13. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL) 14. └─base withOneRestart(expr, restarts[[1L]]) 15. └─base doWithOneRestart(return(expr), restart) ── Error (test-unsupMI.R:137:3): Plot works ──────────────────────────────────── Error in `loadNamespace(x)`: there is no package called 'ggpubr' Backtrace: ▆ 1. ├─testthat::expect_s3_class(...) at test-unsupMI.R:137:2 2. │ └─testthat::quasi_label(enquo(object), arg = "object") 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─doMIsaul::plot_MIpca(...) 5. └─base::loadNamespace(x) 6. └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL) 7. └─base withOneRestart(expr, restarts[[1L]]) 8. └─base doWithOneRestart(return(expr), restart) [ FAIL 4 | WARN 0 | SKIP 3 | PASS 35 ] Error: Test failures Execution halted * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 2 ERRORs, 1 NOTE See ‘/data/gannet/ripley/R/packages/tests-Suggests/doMIsaul.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 1:52.88, 103.28 + 9.01