CRAN Package Check Results for Package WeightIt

Last updated on 2026-03-20 08:54:04 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.5.1 20.11 564.95 585.06 ERROR
r-devel-linux-x86_64-debian-gcc 1.5.1 13.54 388.74 402.28 ERROR
r-devel-linux-x86_64-fedora-clang 1.6.0 41.00 894.09 935.09 OK
r-devel-linux-x86_64-fedora-gcc 1.6.0 43.00 936.45 979.45 OK
r-devel-macos-arm64 1.6.0 5.00 117.00 122.00 OK
r-devel-windows-x86_64 1.5.1 23.00 527.00 550.00 ERROR
r-patched-linux-x86_64 1.5.1 26.68 511.27 537.95 ERROR
r-release-linux-x86_64 1.5.1 19.35 505.22 524.57 ERROR
r-release-macos-arm64 1.5.0 8.00 106.00 114.00 OK
r-release-macos-x86_64 1.6.0 15.00 656.00 671.00 ERROR
r-release-windows-x86_64 1.5.1 23.00 538.00 561.00 ERROR
r-oldrel-macos-arm64 1.6.0 5.00 125.00 130.00 OK
r-oldrel-macos-x86_64 1.6.0 16.00 613.00 629.00 ERROR
r-oldrel-windows-x86_64 1.5.1 30.00 693.00 723.00 ERROR

Check Details

Version: 1.5.1
Check: examples
Result: ERROR Running examples in ‘WeightIt-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: method_energy > ### Title: Energy Balancing > ### Aliases: method_energy > > ### ** Examples > > ## Don't show: > if (rlang::is_installed("osqp")) withAutoprint({ # examplesIf + ## End(Don't show) + data("lalonde", package = "cobalt") + + #Balancing covariates between treatment groups (binary) + (W1 <- weightit(treat ~ age + educ + married + + nodegree + re74, data = lalonde, + method = "energy", estimand = "ATE")) + + summary(W1) + + cobalt::bal.tab(W1) + + #Balancing covariates with respect to race (multi-category) + (W2 <- weightit(race ~ age + educ + married + + nodegree + re74, data = lalonde, + method = "energy", estimand = "ATT", + focal = "black")) + + summary(W2) + + cobalt::bal.tab(W2) + + ## Don't show: + }) # examplesIf > data("lalonde", package = "cobalt") > (W1 <- weightit(treat ~ age + educ + married + nodegree + re74, data = lalonde, + method = "energy", estimand = "ATE")) Warning: ! The `polish` argument is deprecated. ℹ Use `polishing` instead. Error in eval(ei, envir) : OSQP setup failed with error code 2: Solver settings validation. Calls: withAutoprint ... <Anonymous> -> withVisible -> <Anonymous> -> osqp -> osqpSetup Execution halted Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-patched-linux-x86_64

Version: 1.5.1
Check: tests
Result: ERROR Running ‘testthat.R’ [261s/331s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # 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/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(WeightIt) > > test_check("WeightIt") Saving _problems/test-moments-26.R Saving _problems/test-moments-34.R Saving _problems/test-moments-90.R Saving _problems/test-moments-98.R [ FAIL 4 | WARN 0 | SKIP 3 | PASS 2061 ] ══ Skipped tests (3) ═══════════════════════════════════════════════════════════ • On CRAN (3): 'test-method_cbps.R:2:3', 'test-method_cbps.R:108:3', 'test-method_cbps.R:197:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-moments.R:21:5'): moments works as expected, binary ────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. ── Failure ('test-moments.R:30:5'): moments works as expected, binary ────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. ── Failure ('test-moments.R:85:5'): moments works as expected, multi ─────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. ── Failure ('test-moments.R:94:5'): moments works as expected, multi ─────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. [ FAIL 4 | WARN 0 | SKIP 3 | PASS 2061 ] Error: ! Test failures. Execution halted Flavor: r-devel-linux-x86_64-debian-clang

Version: 1.5.1
Check: examples
Result: ERROR Running examples in 'WeightIt-Ex.R' failed The error most likely occurred in: > ### Name: method_energy > ### Title: Energy Balancing > ### Aliases: method_energy > > ### ** Examples > > ## Don't show: > if (rlang::is_installed("osqp")) withAutoprint({ # examplesIf + ## End(Don't show) + data("lalonde", package = "cobalt") + + #Balancing covariates between treatment groups (binary) + (W1 <- weightit(treat ~ age + educ + married + + nodegree + re74, data = lalonde, + method = "energy", estimand = "ATE")) + + summary(W1) + + cobalt::bal.tab(W1) + + #Balancing covariates with respect to race (multi-category) + (W2 <- weightit(race ~ age + educ + married + + nodegree + re74, data = lalonde, + method = "energy", estimand = "ATT", + focal = "black")) + + summary(W2) + + cobalt::bal.tab(W2) + + ## Don't show: + }) # examplesIf > data("lalonde", package = "cobalt") > (W1 <- weightit(treat ~ age + educ + married + nodegree + re74, data = lalonde, + method = "energy", estimand = "ATE")) Warning: ! The `polish` argument is deprecated. ℹ Use `polishing` instead. Error in eval(ei, envir) : OSQP setup failed with error code 2: Solver settings validation. Calls: withAutoprint ... <Anonymous> -> withVisible -> <Anonymous> -> osqp -> osqpSetup Execution halted Flavors: r-devel-windows-x86_64, r-release-windows-x86_64, r-oldrel-windows-x86_64

Version: 1.5.1
Check: tests
Result: ERROR Running 'testthat.R' [285s] Running the tests in 'tests/testthat.R' failed. Complete output: > # 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/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(WeightIt) > > test_check("WeightIt") Saving _problems/test-moments-26.R Saving _problems/test-moments-34.R Saving _problems/test-moments-90.R Saving _problems/test-moments-98.R [ FAIL 4 | WARN 0 | SKIP 3 | PASS 2061 ] ══ Skipped tests (3) ═══════════════════════════════════════════════════════════ • On CRAN (3): 'test-method_cbps.R:2:3', 'test-method_cbps.R:108:3', 'test-method_cbps.R:197:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-moments.R:21:5'): moments works as expected, binary ────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. ── Failure ('test-moments.R:30:5'): moments works as expected, binary ────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. ── Failure ('test-moments.R:85:5'): moments works as expected, multi ─────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. ── Failure ('test-moments.R:94:5'): moments works as expected, multi ─────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. [ FAIL 4 | WARN 0 | SKIP 3 | PASS 2061 ] Error: ! Test failures. Execution halted Flavor: r-devel-windows-x86_64

Version: 1.5.1
Check: tests
Result: ERROR Running ‘testthat.R’ [253s/346s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # 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/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(WeightIt) > > test_check("WeightIt") Saving _problems/test-moments-26.R Saving _problems/test-moments-34.R Saving _problems/test-moments-90.R Saving _problems/test-moments-98.R [ FAIL 4 | WARN 0 | SKIP 3 | PASS 2061 ] ══ Skipped tests (3) ═══════════════════════════════════════════════════════════ • On CRAN (3): 'test-method_cbps.R:2:3', 'test-method_cbps.R:108:3', 'test-method_cbps.R:197:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-moments.R:21:5'): moments works as expected, binary ────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. ── Failure ('test-moments.R:30:5'): moments works as expected, binary ────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. ── Failure ('test-moments.R:85:5'): moments works as expected, multi ─────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. ── Failure ('test-moments.R:94:5'): moments works as expected, multi ─────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. [ FAIL 4 | WARN 0 | SKIP 3 | PASS 2061 ] Error: ! Test failures. Execution halted Flavor: r-patched-linux-x86_64

Version: 1.5.1
Check: examples
Result: ERROR Running examples in ‘WeightIt-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: method_energy > ### Title: Energy Balancing > ### Aliases: method_energy > > ### ** Examples > > ## Don't show: > if (rlang::is_installed("osqp")) withAutoprint({ # examplesIf + ## End(Don't show) + data("lalonde", package = "cobalt") + + #Balancing covariates between treatment groups (binary) + (W1 <- weightit(treat ~ age + educ + married + + nodegree + re74, data = lalonde, + method = "energy", estimand = "ATE")) + + summary(W1) + + cobalt::bal.tab(W1) + + #Balancing covariates with respect to race (multi-category) + (W2 <- weightit(race ~ age + educ + married + + nodegree + re74, data = lalonde, + method = "energy", estimand = "ATT", + focal = "black")) + + summary(W2) + + cobalt::bal.tab(W2) + + ## Don't show: + }) # examplesIf > data("lalonde", package = "cobalt") > (W1 <- weightit(treat ~ age + educ + married + nodegree + re74, data = lalonde, + method = "energy", estimand = "ATE")) Warning: ! The `polish` argument is deprecated. ℹ Use `polishing` instead. Error in eval(ei, envir) : OSQP setup failed with error code 2: Solver settings validation. Calls: withAutoprint ... <Anonymous> -> withVisible -> <Anonymous> -> osqp -> osqpSetup Execution halted Examples with CPU (user + system) or elapsed time > 5s user system elapsed calibrate 3.806 0.109 5.83 Flavor: r-release-linux-x86_64

Version: 1.5.1
Check: tests
Result: ERROR Running ‘testthat.R’ [252s/309s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # 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/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(WeightIt) > > test_check("WeightIt") Saving _problems/test-moments-26.R Saving _problems/test-moments-34.R Saving _problems/test-moments-90.R Saving _problems/test-moments-98.R [ FAIL 4 | WARN 0 | SKIP 3 | PASS 2061 ] ══ Skipped tests (3) ═══════════════════════════════════════════════════════════ • On CRAN (3): 'test-method_cbps.R:2:3', 'test-method_cbps.R:108:3', 'test-method_cbps.R:197:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-moments.R:21:5'): moments works as expected, binary ────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. ── Failure ('test-moments.R:30:5'): moments works as expected, binary ────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. ── Failure ('test-moments.R:85:5'): moments works as expected, multi ─────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. ── Failure ('test-moments.R:94:5'): moments works as expected, multi ─────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. [ FAIL 4 | WARN 0 | SKIP 3 | PASS 2061 ] Error: ! Test failures. Execution halted Flavor: r-release-linux-x86_64

Version: 1.6.0
Check: examples
Result: ERROR Running examples in ‘WeightIt-Ex.R’ failed The error most likely occurred in: > ### Name: method_optweight > ### Title: Stable Balancing Weights > ### Aliases: method_optweight method_sbw > > ### ** Examples > > ## Don't show: > if (rlang::is_installed("optweight (>= 1.0.0)")) withAutoprint({ # examplesIf + ## End(Don't show) + data("lalonde", package = "cobalt") + + #Balancing covariates between treatment groups (binary) + (W1 <- weightit(treat ~ age + educ + race + + nodegree + re74, data = lalonde, + method = "optweight", estimand = "ATT", + tols = 0)) + + summary(W1) + + cobalt::bal.tab(W1) + + plot(W1) + + #Balancing covariates with respect to race (multi-category) + (W2 <- weightit(race ~ age + educ + married + + nodegree + re74, data = lalonde, + method = "optweight", estimand = "ATE", + tols = .01)) + + summary(W2) + + cobalt::bal.tab(W2) + + plot(W2) + + #Balancing covariates with respect to re75 (continuous) + (W3 <- weightit(re75 ~ age + educ + race + + nodegree + re74, data = lalonde, + method = "optweight", tols = .02)) + + summary(W3) + + cobalt::bal.tab(W3) + + plot(W3) + ## Don't show: + }) # examplesIf > data("lalonde", package = "cobalt") > (W1 <- weightit(treat ~ age + educ + race + nodegree + re74, data = lalonde, + method = "optweight", estimand = "ATT", tols = 0)) Error in .check_required_packages(method) : The package "optweight" (>= 2.0.1) is required. Calls: withAutoprint ... weightit.fit -> .check_required_packages -> <Anonymous> Execution halted Flavors: r-release-macos-x86_64, r-oldrel-macos-x86_64

Version: 1.5.1
Check: tests
Result: ERROR Running 'testthat.R' [301s] Running the tests in 'tests/testthat.R' failed. Complete output: > # 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/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(WeightIt) > > test_check("WeightIt") Saving _problems/test-moments-26.R Saving _problems/test-moments-34.R Saving _problems/test-moments-90.R Saving _problems/test-moments-98.R [ FAIL 4 | WARN 0 | SKIP 3 | PASS 2061 ] ══ Skipped tests (3) ═══════════════════════════════════════════════════════════ • On CRAN (3): 'test-method_cbps.R:2:3', 'test-method_cbps.R:108:3', 'test-method_cbps.R:197:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-moments.R:21:5'): moments works as expected, binary ────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. ── Failure ('test-moments.R:30:5'): moments works as expected, binary ────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. ── Failure ('test-moments.R:85:5'): moments works as expected, multi ─────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. ── Failure ('test-moments.R:94:5'): moments works as expected, multi ─────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. [ FAIL 4 | WARN 0 | SKIP 3 | PASS 2061 ] Error: ! Test failures. Execution halted Flavor: r-release-windows-x86_64

Version: 1.5.1
Check: tests
Result: ERROR Running 'testthat.R' [383s] Running the tests in 'tests/testthat.R' failed. Complete output: > # 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/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(WeightIt) > > test_check("WeightIt") Saving _problems/test-moments-26.R Saving _problems/test-moments-34.R Saving _problems/test-moments-90.R Saving _problems/test-moments-98.R [ FAIL 4 | WARN 0 | SKIP 3 | PASS 2061 ] ══ Skipped tests (3) ═══════════════════════════════════════════════════════════ • On CRAN (3): 'test-method_cbps.R:2:3', 'test-method_cbps.R:108:3', 'test-method_cbps.R:197:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-moments.R:21:5'): moments works as expected, binary ────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. ── Failure ('test-moments.R:30:5'): moments works as expected, binary ────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. ── Failure ('test-moments.R:85:5'): moments works as expected, multi ─────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. ── Failure ('test-moments.R:94:5'): moments works as expected, multi ─────────── Expected `{ ... }` not to throw any conditions. Actually got a <simpleWarning> with message: ! The `polish` argument is deprecated. i Use `polishing` instead. [ FAIL 4 | WARN 0 | SKIP 3 | PASS 2061 ] Error: ! Test failures. Execution halted Flavor: r-oldrel-windows-x86_64