R Under development (unstable) (2026-02-02 r89367 ucrt) -- "Unsuffered Consequences" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/tests.html > # * https://testthat.r-lib.org/reference/test_package.html#special-files > > library(testthat) > library(optrefine) Loading required package: MASS Loading required package: Rglpk Loading required package: slam Using the GLPK callable library version 5.0 Loading required package: sampling Loading required package: ggplot2 > > test_check("optrefine") 100 units and 6 covariates No stratification ---------------------- Treatment 0 1 58 42 Average standardized mean difference across covariates and strata: 0.329 Maximum standardized mean difference across covariates and strata: 0.732 (pr) Original stratification ---------------------- Base stratum Treatment 1 2 3 4 5 0 17 12 11 12 6 1 3 8 9 8 14 Average standardized mean difference across covariates and strata: 0.344 Maximum standardized mean difference across covariates and strata: 0.874 (hrt1 for stratum 2) Refined stratification ---------------------- Refined stratum Treatment 1:1 1:2 2:1 2:2 3:1 3:2 4:1 4:2 5:1 5:2 0 0 17 0 12 0 11 0 12 0 6 1 0 3 0 8 0 9 0 8 0 14 Average standardized mean difference across covariates and strata: 0.344 Maximum standardized mean difference across covariates and strata: 0.874 (hrt1 for stratum 2:2) 100 units and 6 covariates No stratification ---------------------- Treatment 0 1 58 42 Average standardized mean difference across covariates and strata: 0.329 Maximum standardized mean difference across covariates and strata: 0.732 (pr) Original stratification ---------------------- Base stratum Treatment 1 2 3 4 5 0 17 12 11 12 6 1 3 8 9 8 14 Average standardized mean difference across covariates and strata: 0.344 Maximum standardized mean difference across covariates and strata: 0.874 (hrt1 for stratum 2) Refined stratification ---------------------- None 100 units and 5 covariates No stratification ---------------------- Treatment 0 1 58 42 Average standardized mean difference across covariates and strata: 0.248 Maximum standardized mean difference across covariates and strata: 0.71 (alb1) Original stratification ---------------------- None Refined stratification ---------------------- None [ FAIL 0 | WARN 0 | SKIP 0 | PASS 120 ] > > proc.time() user system elapsed 12.78 0.82 13.59