* using log directory 'd:/Rcompile/CRANpkg/local/4.3/RItools.Rcheck' * using R version 4.3.3 (2024-02-29 ucrt) * using platform: x86_64-w64-mingw32 (64-bit) * R was compiled by gcc.exe (GCC) 12.3.0 GNU Fortran (GCC) 12.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'RItools/DESCRIPTION' ... OK * this is package 'RItools' version '0.3-3' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'RItools' can be installed ... OK * checking installed package size ... 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 ... [3s] OK * checking whether the package can be loaded with stated dependencies ... [3s] OK * checking whether the package can be unloaded cleanly ... [3s] OK * checking whether the namespace can be loaded with stated dependencies ... [3s] OK * checking whether the namespace can be unloaded cleanly ... [4s] OK * checking loading without being on the library search path ... [3s] 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 ... [16s] OK * checking Rd files ... [1s] OK * checking Rd metadata ... 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 contents of 'data' directory ... OK * checking data for non-ASCII characters ... [0s] OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking examples ... [4s] ERROR Running examples in 'RItools-Ex.R' failed The error most likely occurred in: > ### Name: balanceTest > ### Title: Standardized Differences for Stratified Comparisons > ### Aliases: balanceTest > ### Keywords: design nonparametric > > ### ** Examples > > data(nuclearplants) > ## No strata > balanceTest(pr ~ date + t1 + t2 + cap + ne + ct + bw + cum.n, + data=nuclearplants) strata(): -- stat Treatment Control adj.diff std.diff z vars date 68.5 68.6 -0.118 -0.11 -0.31 t1 14.0 13.6 0.364 0.10 0.28 t2 69.1 59.3 9.78 0.99 2.47 cap 870 805 64.6 0.35 0.89 ne 0.200 0.273 -0.0727 -0.17 -0.43 ct 0.300 0.455 -0.155 -0.31 -0.81 bw 0.200 0.182 0.0182 0.04 0.12 cum.n 8.10 8.73 -0.627 -0.10 -0.26 ---Overall Test--- chisquare df p.value -- 11.5 8 0.177 --- Signif. codes: 0 '***' 0.001 '** ' 0.01 '* ' 0.05 '. ' 0.1 ' ' 1 > > ## Stratified > ## Note use of the `. - cost` to use all columns except `cost` > balanceTest(pr ~ . - cost + strata(pt), + data=nuclearplants) strata(): pt -- stat Treatment Control adj.diff std.diff z Treatment Control adj.diff std.diff z vars date 68.5 68.4 0.109 0.10 0.29 68.5 68.6 -0.118 -0.11 -0.31 t1 14.0 13.2 0.800 0.21 0.79 14.0 13.6 0.364 0.10 0.28 t2 69.1 59.1 10.03 1.01 2.31 69.1 59.3 9.78 0.99 2.47 cap 870 807 62.3 0.34 0.92 870 805 64.6 0.35 0.89 ne 0.200 0.221 -0.0211 -0.05 -0.14 0.200 0.273 -0.0727 -0.17 -0.43 ct 0.300 0.432 -0.132 -0.26 -0.58 0.300 0.455 -0.155 -0.31 -0.81 bw 0.200 0.211 -0.0105 -0.03 -0.31 0.200 0.182 0.0182 0.04 0.12 cum.n 8.10 8.72 -0.616 -0.10 -0.34 8.10 8.73 -0.627 -0.10 -0.26 pt 0.300 0.300 -1.11e-16 0.00 NA 0.300 0.136 1.64e-01 0.39 1.08 ---Overall Test--- chisquare df p.value pt 10.8 8 0.215 -- 12.4 9 0.192 --- Signif. codes: 0 '***' 0.001 '** ' 0.01 '* ' 0.05 '. ' 0.1 ' ' 1 > > ##Missing data handling. > testdata <- nuclearplants > testdata$date[testdata$date < 68] <- NA > balanceTest(pr ~ . - cost + strata(pt), + data = testdata) Error in .local(x, ...) : insufficient space Calls: balanceTest -> sapply -> lapply -> FUN Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [55s] ERROR Running 'testthat.R' [51s] Running 'xBalanceTests2.R' [4s] Comparing 'xBalanceTests2.Rout' to 'xBalanceTests2.Rout.save' ... OK Running the tests in 'tests/testthat.R' failed. Complete output: > library(testthat) > library(RItools) Loading required package: ggplot2 > > test_check("RItools") [ FAIL 5 | WARN 0 | SKIP 0 | PASS 1406 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test.Design.R:650:5'): alignDesigns, designToDescriptives output alignment ── Error in `.local(x, ...)`: insufficient space Backtrace: ▆ 1. └─RItools:::alignDesignsByStrata("strat", simple2) at test.Design.R:650:5 2. ├─base::suppressWarnings(...) 3. │ └─base::withCallingHandlers(...) 4. └─RItools:::slm.wfit.csr(...) 5. └─RItools:::slm.fit.csr.fixed(wx, wy, ...) 6. ├─SparseM::chol(t(x) %*% x, ...) 7. └─SparseM::chol(t(x) %*% x, ...) 8. └─SparseM (local) .local(x, ...) ── Error ('test.Design.R:674:5'): alignDesigns centers covars by stratum ─────── Error in `.local(x, ...)`: insufficient space Backtrace: ▆ 1. └─RItools:::alignDesignsByStrata("strat", simple0) at test.Design.R:674:5 2. ├─base::suppressWarnings(...) 3. │ └─base::withCallingHandlers(...) 4. └─RItools:::slm.wfit.csr(...) 5. └─RItools:::slm.fit.csr.fixed(wx, wy, ...) 6. ├─SparseM::chol(t(x) %*% x, ...) 7. └─SparseM::chol(t(x) %*% x, ...) 8. └─SparseM (local) .local(x, ...) ── Error ('test.Design.R:737:5'): scale() method wrapping to alignDesignsByStrata() ── Error in `.local(x, ...)`: insufficient space Backtrace: ▆ 1. └─RItools:::alignDesignsByStrata("strat", simple2b, post.align.transform = NULL) at test.Design.R:737:5 2. ├─base::suppressWarnings(...) 3. │ └─base::withCallingHandlers(...) 4. └─RItools:::slm.wfit.csr(...) 5. └─RItools:::slm.fit.csr.fixed(wx, wy, ...) 6. ├─SparseM::chol(t(x) %*% x, ...) 7. └─SparseM::chol(t(x) %*% x, ...) 8. └─SparseM (local) .local(x, ...) ── Error ('test.balanceTest.R:219:3'): Use of subset argument ────────────────── Error in `.local(x, ...)`: insufficient space Backtrace: ▆ 1. ├─testthat::expect_warning(...) at test.balanceTest.R:219:3 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─RItools::balanceTest(...) 7. └─base::sapply(...) 8. └─base::lapply(X = X, FUN = FUN, ...) 9. └─RItools (local) FUN(X[[i]], ...) 10. ├─base::suppressWarnings(...) 11. │ └─base::withCallingHandlers(...) 12. └─RItools:::slm.wfit.csr(...) 13. └─RItools:::slm.fit.csr.fixed(wx, wy, ...) 14. ├─SparseM::chol(t(x) %*% x, ...) 15. └─SparseM::chol(t(x) %*% x, ...) 16. └─SparseM (local) .local(x, ...) ── Error ('test.utils.R:48:15'): sparse design strat mean calculator returns 0 for strata w/o non-null wts ── Error in `.local(x, ...)`: insufficient space Backtrace: ▆ 1. ├─testthat::expect_warning(...) at test.utils.R:48:15 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─RItools:::slm.wfit.csr(S_, matrix(1:4), weights = wts) 7. └─RItools:::slm.fit.csr.fixed(wx, wy, ...) 8. ├─SparseM::chol(t(x) %*% x, ...) 9. └─SparseM::chol(t(x) %*% x, ...) 10. └─SparseM (local) .local(x, ...) [ FAIL 5 | WARN 0 | SKIP 0 | PASS 1406 ] Error: Test failures Execution halted * checking PDF version of manual ... [18s] OK * checking HTML version of manual ... [8s] OK * DONE Status: 2 ERRORs