Last updated on 2026-08-02 05:50:34 CEST.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.0.0 | 10.06 | 155.26 | 165.32 | ERROR | |
| r-devel-linux-x86_64-debian-gcc | 1.0.0 | 7.69 | 103.74 | 111.43 | ERROR | |
| r-devel-linux-x86_64-fedora-clang | 1.0.0 | 18.00 | 235.50 | 253.50 | ERROR | |
| r-devel-linux-x86_64-fedora-gcc | 1.0.0 | 112.28 | ERROR | |||
| r-devel-windows-x86_64 | 1.0.0 | 13.00 | 144.00 | 157.00 | ERROR | |
| r-patched-linux-x86_64 | 1.0.0 | 9.38 | 142.83 | 152.21 | ERROR | |
| r-release-linux-x86_64 | 1.0.0 | 9.88 | 141.62 | 151.50 | ERROR | |
| r-release-macos-arm64 | 1.0.0 | 3.00 | 77.00 | 80.00 | OK | |
| r-release-macos-x86_64 | 1.0.0 | 8.00 | 345.00 | 353.00 | OK | |
| r-release-windows-x86_64 | 1.0.0 | 14.00 | 146.00 | 160.00 | ERROR | |
| r-oldrel-macos-arm64 | 1.0.0 | OK | ||||
| r-oldrel-macos-x86_64 | 1.0.0 | 6.00 | 339.00 | 345.00 | OK | |
| r-oldrel-windows-x86_64 | 1.0.0 | 18.00 | 196.00 | 214.00 | ERROR |
Version: 1.0.0
Check: examples
Result: ERROR
Running examples in ‘gtregression-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: check_collinearity
> ### Title: Check Collinearity Using VIF for Fitted Models
> ### Aliases: check_collinearity
>
> ### ** Examples
>
> if (requireNamespace("gtregression", quietly = TRUE) &&
+ requireNamespace("mlbench", quietly = TRUE) &&
+ getRversion() >= "4.1.0") {
+ data(PimaIndiansDiabetes2, package = "mlbench")
+ pima <- PimaIndiansDiabetes2 |> dplyr::filter(!is.na(diabetes))
+ pima$diabetes <- ifelse(pima$diabetes == "pos", 1, 0)
+ fit <- multi_reg(pima,
+ outcome = "diabetes",
+ exposures = c("age", "mass", "glucose"),
+ approach = "logit"
+ )
+ check_collinearity(fit)
+ }
Warning in data(PimaIndiansDiabetes2, package = "mlbench") :
data set ‘PimaIndiansDiabetes2’ not found
Error: object 'PimaIndiansDiabetes2' not found
Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-patched-linux-x86_64, r-release-linux-x86_64
Version: 1.0.0
Check: tests
Result: ERROR
Running ‘testthat.R’ [62s/76s]
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(gtregression)
>
> test_check("gtregression")
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Saving _problems/test-check_collinearity-9.R
Saving _problems/test-check_collinearity-29.R
Saving _problems/test-check_convergence-19.R
Saving _problems/test-check_convergence-113.R
# A tibble: 18 x 6
Variable Type `Missing (%)` Unique Levels Compatibility
<chr> <chr> <chr> <int> <chr> <chr>
1 pregnant numeric 0% 17 - compatible
2 glucose numeric 0.7% 135 - compatible
3 pressure numeric 4.6% 46 - compatible
4 triceps numeric 29.6% 50 - compatible
5 insulin numeric 48.7% 185 - compatible
6 mass numeric 1.4% 247 - compatible
7 pedigree numeric 0% 517 - compatible
8 age numeric 0% 52 - compatible
9 diabetes numeric 0% 2 - maybe
10 bmi factor 1.4% 3 Normal, Overweight, ~ compatible
11 age_cat factor 0% 3 Young, Middle-aged, ~ compatible
12 npreg_cat factor 0% 2 Low parity, High par~ compatible
13 glucose_cat factor 0.7% 2 Normal, High compatible
14 bp_cat factor 4.6% 2 Normal, High compatible
15 triceps_cat factor 29.6% 2 Normal, High compatible
16 insulin_cat factor 48.7% 3 Low, Normal, High compatible
17 dpf_cat factor 0% 3 Low Genetic Risk, Mo~ compatible
18 diabetes_cat factor 0% 2 Diabetes negative, D~ compatible
Interpretation notes:
- compatible: ready to use in regression
- maybe: require transformation to factor or check no of levels
- incompatible: not usable as-is (e.g., all NA, <2 levels)
Saving _problems/test-fit_multi_model-23.R
Saving _problems/test-fit_uni_model-17.R
Saving _problems/test-fit_uni_model-59.R
Saving _problems/test-identify_confounder-27.R
Saving _problems/test-interaction_models-32.R
Saving _problems/test-interaction_models-64.R
Saving _problems/test-interaction_models-96.R
The number rows in the tables to be merged do not match, which may result in rows appearing out of order.
i See `tbl_merge()` (`?gtsummary::tbl_merge()`) help file for details. Use `quiet=TRUE` to silence message.
The number rows in the tables to be merged do not match, which may result in rows appearing out of order.
i See `tbl_merge()` (`?gtsummary::tbl_merge()`) help file for details. Use `quiet=TRUE` to silence message.
Saving _problems/test-multi_reg-50.R
Saving _problems/test-plot_reg-43.R
Saving _problems/test-plot_reg_combine-56.R
Table saved at: /home/hornik/tmp/scratch/Rtmp4HawDJ/regression_results.docx
`height` was translated to `width`.
Plot saved at: /home/hornik/tmp/scratch/Rtmp4HawDJ/plot_png.png
`height` was translated to `width`.
Plot saved at: /home/hornik/tmp/scratch/Rtmp4HawDJ/plot_pdf.pdf
`height` was translated to `width`.
Plot saved at: /home/hornik/tmp/scratch/Rtmp4HawDJ/plot_jpg.jpg
`height` was translated to `width`.
Word document saved at: /home/hornik/tmp/scratch/Rtmp4HawDJ/final_report.docx
If tables or plots extend beyond the page, consider switching to landscape layout in Word (Layout > Orientation > Landscape).
Attaching package: 'MASS'
The following object is masked from 'package:gtsummary':
select
The following object is masked from 'package:dplyr':
select
Saving _problems/test-select_models-25.R
Saving _problems/test-stratified_multi_reg-32.R
Saving _problems/test-stratified_multi_reg-75.R
Saving _problems/test-stratified_multi_reg-120.R
Saving _problems/test-stratified_multi_reg-167.R
Saving _problems/test-stratified_uni_reg-21.R
Saving _problems/test-stratified_uni_reg-46.R
Saving _problems/test-stratified_uni_reg-71.R
Saving _problems/test-stratified_uni_reg-106.R
Saving _problems/test-stratified_uni_reg-142.R
Saving _problems/test-stratified_uni_reg-167.R
Saving _problems/test-uni_reg-10.R
Saving _problems/test-uni_reg-70.R
[ FAIL 27 | WARN 29 | SKIP 1 | PASS 92 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-dissect.R:1:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-check_collinearity.R:7:3'): check_collinearity works correctly for multivariable models ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-check_collinearity.R:7:3
2. └─dplyr::filter(PimaIndiansDiabetes2, !is.na(diabetes))
── Error ('test-check_collinearity.R:27:3'): check_collinearity throws error for univariate models ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-check_collinearity.R:27:3
2. └─dplyr::filter(PimaIndiansDiabetes2, !is.na(diabetes))
── Error ('test-check_convergence.R:4:3'): check_convergence runs correctly for valid approaches ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-check_convergence.R:4:3
── Error ('test-check_convergence.R:98:3'): check_convergence handles model fitting failure ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-check_convergence.R:98:3
── Error ('test-fit_multi_model.R:7:3'): .fit_multi_model returns correct model class for each approach ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-fit_multi_model.R:7:3
2. └─dplyr::mutate(...)
── Error ('test-fit_uni_model.R:7:3'): .fit_uni_model returns correct model class (PimaIndiansDiabetes2) ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-fit_uni_model.R:7:3
2. └─dplyr::mutate(...)
── Error ('test-fit_uni_model.R:55:3'): .fit_uni_model handles model fitting failure gracefully ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-fit_uni_model.R:55:3
── Error ('test-identify_confounder.R:6:3'): identify_confounder works across approaches using
change-in-estimate method ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-identify_confounder.R:6:3
── Error ('test-interaction_models.R:6:3'): interaction_models returns a list with expected names ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:6:3
2. └─dplyr::mutate(...)
── Error ('test-interaction_models.R:52:3'): interaction_models handles robpoisson approach ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:52:3
2. └─dplyr::mutate(...)
── Error ('test-interaction_models.R:84:3'): interaction_models errors with invalid approach ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:84:3
2. └─dplyr::mutate(...)
── Error ('test-multi_reg.R:11:3'): multi_reg computes estimates correctly across approaches ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-multi_reg.R:11:3
── Error ('test-plot_reg.R:9:3'): plot_reg works with default settings and correct X-axis labels ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-plot_reg.R:9:3
2. └─dplyr::mutate(...)
── Error ('test-plot_reg_combine.R:9:3'): plot_reg_combine works with various options ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-plot_reg_combine.R:9:3
── Error ('test-select_models.R:8:3'): select_models works for valid approaches and directions ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-select_models.R:8:3
── Error ('test-stratified_multi_reg.R:9:3'): stratified_multi_reg returns a gtsummary tbl_merge object ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:9:3
── Error ('test-stratified_multi_reg.R:61:3'): stratified_multi_reg excludes NA values in stratifier ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:61:3
── Error ('test-stratified_multi_reg.R:109:3'): stratified_multi_reg runs with robpoisson and produces estimates ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:109:3
── Error ('test-stratified_multi_reg.R:153:3'): stratified_multi_reg works with negbin ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-stratified_multi_reg.R:153:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:4:3'): stratified_uni_reg returns a gtsummary tbl_merge object with logit ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-stratified_uni_reg.R:4:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:40:3'): stratified_uni_reg excludes NA values in stratifier ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:40:3
── Error ('test-stratified_uni_reg.R:67:3'): stratified_uni_reg errors for invalid inputs ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:67:3
── Error ('test-stratified_uni_reg.R:100:3'): stratified_uni_reg works with robpoisson ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:100:3
── Error ('test-stratified_uni_reg.R:126:3'): stratified_uni_reg works with negbin ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-stratified_uni_reg.R:126:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:163:3'): stratified_uni_reg errors when no valid strata exist ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:163:3
── Error ('test-uni_reg.R:6:3'): uni_reg returns a gtsummary object and works with binary data ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─tidyr::drop_na(...) at test-uni_reg.R:6:3
2. └─dplyr::mutate(...)
── Error ('test-uni_reg.R:70:3'): uni_reg$ accessors return correct components ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─tidyr::drop_na(PimaIndiansDiabetes2) at test-uni_reg.R:70:3
[ FAIL 27 | WARN 29 | SKIP 1 | PASS 92 ]
Error:
! Test failures.
Execution halted
Flavor: r-devel-linux-x86_64-debian-clang
Version: 1.0.0
Check: tests
Result: ERROR
Running ‘testthat.R’ [39s/43s]
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(gtregression)
>
> test_check("gtregression")
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Saving _problems/test-check_collinearity-9.R
Saving _problems/test-check_collinearity-29.R
Saving _problems/test-check_convergence-19.R
Saving _problems/test-check_convergence-113.R
# A tibble: 18 x 6
Variable Type `Missing (%)` Unique Levels Compatibility
<chr> <chr> <chr> <int> <chr> <chr>
1 pregnant numeric 0% 17 - compatible
2 glucose numeric 0.7% 135 - compatible
3 pressure numeric 4.6% 46 - compatible
4 triceps numeric 29.6% 50 - compatible
5 insulin numeric 48.7% 185 - compatible
6 mass numeric 1.4% 247 - compatible
7 pedigree numeric 0% 517 - compatible
8 age numeric 0% 52 - compatible
9 diabetes numeric 0% 2 - maybe
10 bmi factor 1.4% 3 Normal, Overweight, ~ compatible
11 age_cat factor 0% 3 Young, Middle-aged, ~ compatible
12 npreg_cat factor 0% 2 Low parity, High par~ compatible
13 glucose_cat factor 0.7% 2 Normal, High compatible
14 bp_cat factor 4.6% 2 Normal, High compatible
15 triceps_cat factor 29.6% 2 Normal, High compatible
16 insulin_cat factor 48.7% 3 Low, Normal, High compatible
17 dpf_cat factor 0% 3 Low Genetic Risk, Mo~ compatible
18 diabetes_cat factor 0% 2 Diabetes negative, D~ compatible
Interpretation notes:
- compatible: ready to use in regression
- maybe: require transformation to factor or check no of levels
- incompatible: not usable as-is (e.g., all NA, <2 levels)
Saving _problems/test-fit_multi_model-23.R
Saving _problems/test-fit_uni_model-17.R
Saving _problems/test-fit_uni_model-59.R
Saving _problems/test-identify_confounder-27.R
Saving _problems/test-interaction_models-32.R
Saving _problems/test-interaction_models-64.R
Saving _problems/test-interaction_models-96.R
The number rows in the tables to be merged do not match, which may result in rows appearing out of order.
i See `tbl_merge()` (`?gtsummary::tbl_merge()`) help file for details. Use `quiet=TRUE` to silence message.
The number rows in the tables to be merged do not match, which may result in rows appearing out of order.
i See `tbl_merge()` (`?gtsummary::tbl_merge()`) help file for details. Use `quiet=TRUE` to silence message.
Saving _problems/test-multi_reg-50.R
Saving _problems/test-plot_reg-43.R
Saving _problems/test-plot_reg_combine-56.R
Table saved at: /home/hornik/tmp/scratch/RtmpDUQaDk/regression_results.docx
`height` was translated to `width`.
Plot saved at: /home/hornik/tmp/scratch/RtmpDUQaDk/plot_png.png
`height` was translated to `width`.
Plot saved at: /home/hornik/tmp/scratch/RtmpDUQaDk/plot_pdf.pdf
`height` was translated to `width`.
Plot saved at: /home/hornik/tmp/scratch/RtmpDUQaDk/plot_jpg.jpg
`height` was translated to `width`.
Word document saved at: /home/hornik/tmp/scratch/RtmpDUQaDk/final_report.docx
If tables or plots extend beyond the page, consider switching to landscape layout in Word (Layout > Orientation > Landscape).
Attaching package: 'MASS'
The following object is masked from 'package:gtsummary':
select
The following object is masked from 'package:dplyr':
select
Saving _problems/test-select_models-25.R
Saving _problems/test-stratified_multi_reg-32.R
Saving _problems/test-stratified_multi_reg-75.R
Saving _problems/test-stratified_multi_reg-120.R
Saving _problems/test-stratified_multi_reg-167.R
Saving _problems/test-stratified_uni_reg-21.R
Saving _problems/test-stratified_uni_reg-46.R
Saving _problems/test-stratified_uni_reg-71.R
Saving _problems/test-stratified_uni_reg-106.R
Saving _problems/test-stratified_uni_reg-142.R
Saving _problems/test-stratified_uni_reg-167.R
Saving _problems/test-uni_reg-10.R
Saving _problems/test-uni_reg-70.R
[ FAIL 27 | WARN 29 | SKIP 1 | PASS 92 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-dissect.R:1:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-check_collinearity.R:7:3'): check_collinearity works correctly for multivariable models ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-check_collinearity.R:7:3
2. └─dplyr::filter(PimaIndiansDiabetes2, !is.na(diabetes))
── Error ('test-check_collinearity.R:27:3'): check_collinearity throws error for univariate models ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-check_collinearity.R:27:3
2. └─dplyr::filter(PimaIndiansDiabetes2, !is.na(diabetes))
── Error ('test-check_convergence.R:4:3'): check_convergence runs correctly for valid approaches ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-check_convergence.R:4:3
── Error ('test-check_convergence.R:98:3'): check_convergence handles model fitting failure ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-check_convergence.R:98:3
── Error ('test-fit_multi_model.R:7:3'): .fit_multi_model returns correct model class for each approach ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-fit_multi_model.R:7:3
2. └─dplyr::mutate(...)
── Error ('test-fit_uni_model.R:7:3'): .fit_uni_model returns correct model class (PimaIndiansDiabetes2) ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-fit_uni_model.R:7:3
2. └─dplyr::mutate(...)
── Error ('test-fit_uni_model.R:55:3'): .fit_uni_model handles model fitting failure gracefully ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-fit_uni_model.R:55:3
── Error ('test-identify_confounder.R:6:3'): identify_confounder works across approaches using
change-in-estimate method ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-identify_confounder.R:6:3
── Error ('test-interaction_models.R:6:3'): interaction_models returns a list with expected names ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:6:3
2. └─dplyr::mutate(...)
── Error ('test-interaction_models.R:52:3'): interaction_models handles robpoisson approach ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:52:3
2. └─dplyr::mutate(...)
── Error ('test-interaction_models.R:84:3'): interaction_models errors with invalid approach ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:84:3
2. └─dplyr::mutate(...)
── Error ('test-multi_reg.R:11:3'): multi_reg computes estimates correctly across approaches ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-multi_reg.R:11:3
── Error ('test-plot_reg.R:9:3'): plot_reg works with default settings and correct X-axis labels ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-plot_reg.R:9:3
2. └─dplyr::mutate(...)
── Error ('test-plot_reg_combine.R:9:3'): plot_reg_combine works with various options ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-plot_reg_combine.R:9:3
── Error ('test-select_models.R:8:3'): select_models works for valid approaches and directions ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-select_models.R:8:3
── Error ('test-stratified_multi_reg.R:9:3'): stratified_multi_reg returns a gtsummary tbl_merge object ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:9:3
── Error ('test-stratified_multi_reg.R:61:3'): stratified_multi_reg excludes NA values in stratifier ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:61:3
── Error ('test-stratified_multi_reg.R:109:3'): stratified_multi_reg runs with robpoisson and produces estimates ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:109:3
── Error ('test-stratified_multi_reg.R:153:3'): stratified_multi_reg works with negbin ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-stratified_multi_reg.R:153:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:4:3'): stratified_uni_reg returns a gtsummary tbl_merge object with logit ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-stratified_uni_reg.R:4:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:40:3'): stratified_uni_reg excludes NA values in stratifier ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:40:3
── Error ('test-stratified_uni_reg.R:67:3'): stratified_uni_reg errors for invalid inputs ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:67:3
── Error ('test-stratified_uni_reg.R:100:3'): stratified_uni_reg works with robpoisson ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:100:3
── Error ('test-stratified_uni_reg.R:126:3'): stratified_uni_reg works with negbin ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-stratified_uni_reg.R:126:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:163:3'): stratified_uni_reg errors when no valid strata exist ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:163:3
── Error ('test-uni_reg.R:6:3'): uni_reg returns a gtsummary object and works with binary data ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─tidyr::drop_na(...) at test-uni_reg.R:6:3
2. └─dplyr::mutate(...)
── Error ('test-uni_reg.R:70:3'): uni_reg$ accessors return correct components ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─tidyr::drop_na(PimaIndiansDiabetes2) at test-uni_reg.R:70:3
[ FAIL 27 | WARN 29 | SKIP 1 | PASS 92 ]
Error:
! Test failures.
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 1.0.0
Check: for new files in some other directories
Result: NOTE
Found the following files/directories:
‘~/tmp/scratch/Rtmp05bNCb’ ‘~/tmp/scratch/Rtmp0BV0bq’
‘~/tmp/scratch/Rtmp0IU436’ ‘~/tmp/scratch/Rtmp0e0lwe’
‘~/tmp/scratch/Rtmp0fwGa0’ ‘~/tmp/scratch/Rtmp0sF4PR’
‘~/tmp/scratch/Rtmp1BzT6U’ ‘~/tmp/scratch/Rtmp1RYyyJ’
‘~/tmp/scratch/Rtmp2Na7ze’ ‘~/tmp/scratch/Rtmp2mtsLR’
‘~/tmp/scratch/Rtmp2paDjq’ ‘~/tmp/scratch/Rtmp3GZBtL’
‘~/tmp/scratch/Rtmp3QkJQ9’ ‘~/tmp/scratch/Rtmp3UzmRd’
‘~/tmp/scratch/Rtmp3yA8Kz’ ‘~/tmp/scratch/Rtmp5himah’
‘~/tmp/scratch/Rtmp61ahry’ ‘~/tmp/scratch/Rtmp63z8Dj’
‘~/tmp/scratch/Rtmp6DMvzZ’ ‘~/tmp/scratch/Rtmp6Ot3xD’
‘~/tmp/scratch/Rtmp6pBfXX’ ‘~/tmp/scratch/Rtmp6vwac4’
‘~/tmp/scratch/Rtmp7SjTsq’ ‘~/tmp/scratch/Rtmp8htSx0’
‘~/tmp/scratch/Rtmp94ei9M’ ‘~/tmp/scratch/Rtmp9GNIRm’
‘~/tmp/scratch/RtmpA0CQ2e’ ‘~/tmp/scratch/RtmpA2IEmn’
‘~/tmp/scratch/RtmpAQgdsP’ ‘~/tmp/scratch/RtmpAe9kwt’
‘~/tmp/scratch/RtmpBA05Lw’ ‘~/tmp/scratch/RtmpCG3JsY’
‘~/tmp/scratch/RtmpCWKCpw’ ‘~/tmp/scratch/RtmpCvDOVd’
‘~/tmp/scratch/RtmpDQvMTm’ ‘~/tmp/scratch/RtmpDTYV8q’
‘~/tmp/scratch/RtmpDjSs9J’ ‘~/tmp/scratch/RtmpGcfw6C’
‘~/tmp/scratch/RtmpH3xiMs’ ‘~/tmp/scratch/RtmpHgsFuI’
‘~/tmp/scratch/RtmpIDZAZZ’ ‘~/tmp/scratch/RtmpILZn61’
‘~/tmp/scratch/RtmpIVRMO6’ ‘~/tmp/scratch/RtmpIY4jo7’
‘~/tmp/scratch/RtmpJwsfaN’ ‘~/tmp/scratch/RtmpM9zoZx’
‘~/tmp/scratch/RtmpNFClGu’ ‘~/tmp/scratch/RtmpO9DvjL’
‘~/tmp/scratch/RtmpOA6pBt’ ‘~/tmp/scratch/RtmpOqNKX1’
‘~/tmp/scratch/RtmpOs3UXn’ ‘~/tmp/scratch/RtmpOxdBJo’
‘~/tmp/scratch/RtmpOyPXSk’ ‘~/tmp/scratch/RtmpPCVv7B’
‘~/tmp/scratch/RtmpQeenrT’ ‘~/tmp/scratch/RtmpQtxDem’
‘~/tmp/scratch/RtmpQy7L5c’ ‘~/tmp/scratch/RtmpRPLNBd’
‘~/tmp/scratch/RtmpSNUta4’ ‘~/tmp/scratch/RtmpSWBBLT’
‘~/tmp/scratch/RtmpSbVgI1’ ‘~/tmp/scratch/RtmpT9EQcI’
‘~/tmp/scratch/RtmpTG3PT5’ ‘~/tmp/scratch/RtmpTajMMY’
‘~/tmp/scratch/RtmpUbYTHr’ ‘~/tmp/scratch/RtmpVfTL8Z’
‘~/tmp/scratch/RtmpWMVwtQ’ ‘~/tmp/scratch/RtmpXE01MR’
‘~/tmp/scratch/RtmpXFIEDn’ ‘~/tmp/scratch/RtmpXYZyFj’
‘~/tmp/scratch/RtmpYcEKY0’ ‘~/tmp/scratch/RtmpYfgWqE’
‘~/tmp/scratch/RtmpaOAR46’ ‘~/tmp/scratch/RtmpaOjid6’
‘~/tmp/scratch/Rtmpaj11Mz’ ‘~/tmp/scratch/Rtmpat71gE’
‘~/tmp/scratch/RtmpbX8b4i’ ‘~/tmp/scratch/Rtmpbn05Ff’
‘~/tmp/scratch/Rtmpd82SEA’ ‘~/tmp/scratch/RtmpdPs49L’
‘~/tmp/scratch/RtmpdWb9Xq’ ‘~/tmp/scratch/RtmpdXKPHS’
‘~/tmp/scratch/RtmpdZ1wsv’ ‘~/tmp/scratch/RtmpdomAdh’
‘~/tmp/scratch/RtmpdtoKc4’ ‘~/tmp/scratch/RtmpdxgItR’
‘~/tmp/scratch/RtmpeBQIam’ ‘~/tmp/scratch/RtmpeBZRNV’
‘~/tmp/scratch/RtmpeDOUi1’ ‘~/tmp/scratch/RtmpeEvgps’
‘~/tmp/scratch/RtmpeKQIJh’ ‘~/tmp/scratch/RtmpeNr8Lf’
‘~/tmp/scratch/RtmpeQH8fm’ ‘~/tmp/scratch/RtmpehFLfz’
‘~/tmp/scratch/Rtmpep0Lsf’ ‘~/tmp/scratch/Rtmpf3vc1k’
‘~/tmp/scratch/Rtmpf4lx4i’ ‘~/tmp/scratch/RtmpfXsN2C’
‘~/tmp/scratch/RtmpfdGsFZ’ ‘~/tmp/scratch/Rtmpfxb3r4’
‘~/tmp/scratch/RtmpgJWocV’ ‘~/tmp/scratch/RtmphJ5DoM’
‘~/tmp/scratch/RtmphOOO5R’ ‘~/tmp/scratch/RtmphPbsHv’
‘~/tmp/scratch/RtmphRoyZf’ ‘~/tmp/scratch/RtmphUxMfW’
‘~/tmp/scratch/RtmpheBR02’ ‘~/tmp/scratch/RtmphqylLe’
‘~/tmp/scratch/Rtmpiec6kO’ ‘~/tmp/scratch/Rtmpja7LQf’
‘~/tmp/scratch/Rtmpk3YMge’ ‘~/tmp/scratch/RtmpkCi73a’
‘~/tmp/scratch/RtmpkUvCRz’ ‘~/tmp/scratch/Rtmpl1Tigx’
‘~/tmp/scratch/Rtmpl4Asew’ ‘~/tmp/scratch/Rtmpl7skDb’
‘~/tmp/scratch/RtmplJd55v’ ‘~/tmp/scratch/RtmplVOJsE’
‘~/tmp/scratch/Rtmpm4afxu’ ‘~/tmp/scratch/RtmpmsoLTc’
‘~/tmp/scratch/RtmpmvVD72’ ‘~/tmp/scratch/RtmpnDmjJo’
‘~/tmp/scratch/RtmppleAMh’ ‘~/tmp/scratch/Rtmppz749T’
‘~/tmp/scratch/Rtmpq2HmiM’ ‘~/tmp/scratch/RtmpqC5l5Q’
‘~/tmp/scratch/RtmpqXODVI’ ‘~/tmp/scratch/RtmpsJpJjx’
‘~/tmp/scratch/RtmpshRLaI’ ‘~/tmp/scratch/RtmpstH0ZR’
‘~/tmp/scratch/Rtmpt2hrB1’ ‘~/tmp/scratch/Rtmpt57WDm’
‘~/tmp/scratch/RtmptAgk4I’ ‘~/tmp/scratch/RtmptKVjaF’
‘~/tmp/scratch/RtmptV2hsq’ ‘~/tmp/scratch/RtmptZNJga’
‘~/tmp/scratch/Rtmpu4bFkH’ ‘~/tmp/scratch/Rtmpw1ebdP’
‘~/tmp/scratch/Rtmpw317Di’ ‘~/tmp/scratch/RtmpxoMlB3’
‘~/tmp/scratch/Rtmpxr6NqJ’ ‘~/tmp/scratch/Rtmpxu6v3b’
‘~/tmp/scratch/RtmpyUj7Pi’ ‘~/tmp/scratch/Rtmpz4lgo9’
‘~/tmp/scratch/RtmpzM58TJ’ ‘~/tmp/scratch/RtmpzzmhFJ’
‘~/tmp/scratch/xvfb-run.0xN4w0’ ‘~/tmp/scratch/xvfb-run.4C5jWL’
‘~/tmp/scratch/xvfb-run.4OEf1s’ ‘~/tmp/scratch/xvfb-run.4hmQZx’
‘~/tmp/scratch/xvfb-run.5RRPsQ’ ‘~/tmp/scratch/xvfb-run.7CWlXs’
‘~/tmp/scratch/xvfb-run.8I34pH’ ‘~/tmp/scratch/xvfb-run.8utMAS’
‘~/tmp/scratch/xvfb-run.AjyIMV’ ‘~/tmp/scratch/xvfb-run.As3pus’
‘~/tmp/scratch/xvfb-run.BkeddD’ ‘~/tmp/scratch/xvfb-run.DASdmS’
‘~/tmp/scratch/xvfb-run.GWFZJe’ ‘~/tmp/scratch/xvfb-run.HRhl8p’
‘~/tmp/scratch/xvfb-run.IL0fEE’ ‘~/tmp/scratch/xvfb-run.Jf0dPf’
‘~/tmp/scratch/xvfb-run.KH4Bu4’ ‘~/tmp/scratch/xvfb-run.KwCQSn’
‘~/tmp/scratch/xvfb-run.LMD6Ae’ ‘~/tmp/scratch/xvfb-run.LNAJOI’
‘~/tmp/scratch/xvfb-run.Lr4pVX’ ‘~/tmp/scratch/xvfb-run.MUtxwx’
‘~/tmp/scratch/xvfb-run.MbPel1’ ‘~/tmp/scratch/xvfb-run.MkPaI6’
‘~/tmp/scratch/xvfb-run.MveaSN’ ‘~/tmp/scratch/xvfb-run.NGwabx’
‘~/tmp/scratch/xvfb-run.PvGEuO’ ‘~/tmp/scratch/xvfb-run.RBBALM’
‘~/tmp/scratch/xvfb-run.RFmAnF’ ‘~/tmp/scratch/xvfb-run.RUTF8T’
‘~/tmp/scratch/xvfb-run.SyQDIt’ ‘~/tmp/scratch/xvfb-run.TQFHY1’
‘~/tmp/scratch/xvfb-run.VbyLPT’ ‘~/tmp/scratch/xvfb-run.WfWMlr’
‘~/tmp/scratch/xvfb-run.XHg2Aq’ ‘~/tmp/scratch/xvfb-run.YbEZFs’
‘~/tmp/scratch/xvfb-run.Z6wOUk’ ‘~/tmp/scratch/xvfb-run.ajRTAj’
‘~/tmp/scratch/xvfb-run.eIEf96’ ‘~/tmp/scratch/xvfb-run.gkjaE4’
‘~/tmp/scratch/xvfb-run.hBHagW’ ‘~/tmp/scratch/xvfb-run.hVxLSn’
‘~/tmp/scratch/xvfb-run.mG7F9B’ ‘~/tmp/scratch/xvfb-run.mQ0sDZ’
‘~/tmp/scratch/xvfb-run.ngLZGf’ ‘~/tmp/scratch/xvfb-run.nmEJJk’
‘~/tmp/scratch/xvfb-run.ogNM8T’ ‘~/tmp/scratch/xvfb-run.qFWSoO’
‘~/tmp/scratch/xvfb-run.qkKyJz’ ‘~/tmp/scratch/xvfb-run.sX3O3I’
‘~/tmp/scratch/xvfb-run.t4cn07’ ‘~/tmp/scratch/xvfb-run.uHPjjU’
‘~/tmp/scratch/xvfb-run.uXSTND’ ‘~/tmp/scratch/xvfb-run.uZF0aE’
‘~/tmp/scratch/xvfb-run.v07P7O’ ‘~/tmp/scratch/xvfb-run.w9IEPX’
‘~/tmp/scratch/xvfb-run.wNhwR2’ ‘~/tmp/scratch/xvfb-run.wNiqsZ’
‘~/tmp/scratch/xvfb-run.yxsBKo’ ‘~/tmp/scratch/xvfb-run.zMLuIR’
‘~/tmp/scratch/xvfb-run.ztmspd’
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 1.0.0
Check: examples
Result: ERROR
Running examples in ‘gtregression-Ex.R’ failed
The error most likely occurred in:
> ### Name: check_collinearity
> ### Title: Check Collinearity Using VIF for Fitted Models
> ### Aliases: check_collinearity
>
> ### ** Examples
>
> if (requireNamespace("gtregression", quietly = TRUE) &&
+ requireNamespace("mlbench", quietly = TRUE) &&
+ getRversion() >= "4.1.0") {
+ data(PimaIndiansDiabetes2, package = "mlbench")
+ pima <- PimaIndiansDiabetes2 |> dplyr::filter(!is.na(diabetes))
+ pima$diabetes <- ifelse(pima$diabetes == "pos", 1, 0)
+ fit <- multi_reg(pima,
+ outcome = "diabetes",
+ exposures = c("age", "mass", "glucose"),
+ approach = "logit"
+ )
+ check_collinearity(fit)
+ }
Warning in data(PimaIndiansDiabetes2, package = "mlbench") :
data set ‘PimaIndiansDiabetes2’ not found
Error: object 'PimaIndiansDiabetes2' not found
Execution halted
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-release-windows-x86_64, r-oldrel-windows-x86_64
Version: 1.0.0
Check: tests
Result: ERROR
Running ‘testthat.R’ [100s/136s]
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(gtregression)
>
> test_check("gtregression")
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Saving _problems/test-check_collinearity-9.R
Saving _problems/test-check_collinearity-29.R
Saving _problems/test-check_convergence-19.R
Saving _problems/test-check_convergence-113.R
# A tibble: 18 x 6
Variable Type `Missing (%)` Unique Levels Compatibility
<chr> <chr> <chr> <int> <chr> <chr>
1 pregnant numeric 0% 17 - compatible
2 glucose numeric 0.7% 135 - compatible
3 pressure numeric 4.6% 46 - compatible
4 triceps numeric 29.6% 50 - compatible
5 insulin numeric 48.7% 185 - compatible
6 mass numeric 1.4% 247 - compatible
7 pedigree numeric 0% 517 - compatible
8 age numeric 0% 52 - compatible
9 diabetes numeric 0% 2 - maybe
10 bmi factor 1.4% 3 Normal, Overweight, ~ compatible
11 age_cat factor 0% 3 Young, Middle-aged, ~ compatible
12 npreg_cat factor 0% 2 Low parity, High par~ compatible
13 glucose_cat factor 0.7% 2 Normal, High compatible
14 bp_cat factor 4.6% 2 Normal, High compatible
15 triceps_cat factor 29.6% 2 Normal, High compatible
16 insulin_cat factor 48.7% 3 Low, Normal, High compatible
17 dpf_cat factor 0% 3 Low Genetic Risk, Mo~ compatible
18 diabetes_cat factor 0% 2 Diabetes negative, D~ compatible
Interpretation notes:
- compatible: ready to use in regression
- maybe: require transformation to factor or check no of levels
- incompatible: not usable as-is (e.g., all NA, <2 levels)
Saving _problems/test-fit_multi_model-23.R
Saving _problems/test-fit_uni_model-17.R
Saving _problems/test-fit_uni_model-59.R
Saving _problems/test-identify_confounder-27.R
Saving _problems/test-interaction_models-32.R
Saving _problems/test-interaction_models-64.R
Saving _problems/test-interaction_models-96.R
The number rows in the tables to be merged do not match, which may result in rows appearing out of order.
i See `tbl_merge()` (`?gtsummary::tbl_merge()`) help file for details. Use `quiet=TRUE` to silence message.
The number rows in the tables to be merged do not match, which may result in rows appearing out of order.
i See `tbl_merge()` (`?gtsummary::tbl_merge()`) help file for details. Use `quiet=TRUE` to silence message.
Saving _problems/test-multi_reg-50.R
Saving _problems/test-plot_reg-43.R
Saving _problems/test-plot_reg_combine-56.R
Table saved at: /tmp/RtmpOZhzjs/working_dir/RtmprX43pI/regression_results.docx
`height` was translated to `width`.
Plot saved at: /tmp/RtmpOZhzjs/working_dir/RtmprX43pI/plot_png.png
`height` was translated to `width`.
Plot saved at: /tmp/RtmpOZhzjs/working_dir/RtmprX43pI/plot_pdf.pdf
`height` was translated to `width`.
Plot saved at: /tmp/RtmpOZhzjs/working_dir/RtmprX43pI/plot_jpg.jpg
`height` was translated to `width`.
Word document saved at: /tmp/RtmpOZhzjs/working_dir/RtmprX43pI/final_report.docx
If tables or plots extend beyond the page, consider switching to landscape layout in Word (Layout > Orientation > Landscape).
Attaching package: 'MASS'
The following object is masked from 'package:gtsummary':
select
The following object is masked from 'package:dplyr':
select
Saving _problems/test-select_models-25.R
Saving _problems/test-stratified_multi_reg-32.R
Saving _problems/test-stratified_multi_reg-75.R
Saving _problems/test-stratified_multi_reg-120.R
Saving _problems/test-stratified_multi_reg-167.R
Saving _problems/test-stratified_uni_reg-21.R
Saving _problems/test-stratified_uni_reg-46.R
Saving _problems/test-stratified_uni_reg-71.R
Saving _problems/test-stratified_uni_reg-106.R
Saving _problems/test-stratified_uni_reg-142.R
Saving _problems/test-stratified_uni_reg-167.R
Saving _problems/test-uni_reg-10.R
Saving _problems/test-uni_reg-70.R
[ FAIL 27 | WARN 29 | SKIP 1 | PASS 92 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-dissect.R:1:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-check_collinearity.R:7:3'): check_collinearity works correctly for multivariable models ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-check_collinearity.R:7:3
2. └─dplyr::filter(PimaIndiansDiabetes2, !is.na(diabetes))
── Error ('test-check_collinearity.R:27:3'): check_collinearity throws error for univariate models ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-check_collinearity.R:27:3
2. └─dplyr::filter(PimaIndiansDiabetes2, !is.na(diabetes))
── Error ('test-check_convergence.R:4:3'): check_convergence runs correctly for valid approaches ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-check_convergence.R:4:3
── Error ('test-check_convergence.R:98:3'): check_convergence handles model fitting failure ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-check_convergence.R:98:3
── Error ('test-fit_multi_model.R:7:3'): .fit_multi_model returns correct model class for each approach ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-fit_multi_model.R:7:3
2. └─dplyr::mutate(...)
── Error ('test-fit_uni_model.R:7:3'): .fit_uni_model returns correct model class (PimaIndiansDiabetes2) ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-fit_uni_model.R:7:3
2. └─dplyr::mutate(...)
── Error ('test-fit_uni_model.R:55:3'): .fit_uni_model handles model fitting failure gracefully ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-fit_uni_model.R:55:3
── Error ('test-identify_confounder.R:6:3'): identify_confounder works across approaches using
change-in-estimate method ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-identify_confounder.R:6:3
── Error ('test-interaction_models.R:6:3'): interaction_models returns a list with expected names ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:6:3
2. └─dplyr::mutate(...)
── Error ('test-interaction_models.R:52:3'): interaction_models handles robpoisson approach ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:52:3
2. └─dplyr::mutate(...)
── Error ('test-interaction_models.R:84:3'): interaction_models errors with invalid approach ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:84:3
2. └─dplyr::mutate(...)
── Error ('test-multi_reg.R:11:3'): multi_reg computes estimates correctly across approaches ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-multi_reg.R:11:3
── Error ('test-plot_reg.R:9:3'): plot_reg works with default settings and correct X-axis labels ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-plot_reg.R:9:3
2. └─dplyr::mutate(...)
── Error ('test-plot_reg_combine.R:9:3'): plot_reg_combine works with various options ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-plot_reg_combine.R:9:3
── Error ('test-select_models.R:8:3'): select_models works for valid approaches and directions ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-select_models.R:8:3
── Error ('test-stratified_multi_reg.R:9:3'): stratified_multi_reg returns a gtsummary tbl_merge object ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:9:3
── Error ('test-stratified_multi_reg.R:61:3'): stratified_multi_reg excludes NA values in stratifier ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:61:3
── Error ('test-stratified_multi_reg.R:109:3'): stratified_multi_reg runs with robpoisson and produces estimates ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:109:3
── Error ('test-stratified_multi_reg.R:153:3'): stratified_multi_reg works with negbin ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-stratified_multi_reg.R:153:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:4:3'): stratified_uni_reg returns a gtsummary tbl_merge object with logit ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-stratified_uni_reg.R:4:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:40:3'): stratified_uni_reg excludes NA values in stratifier ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:40:3
── Error ('test-stratified_uni_reg.R:67:3'): stratified_uni_reg errors for invalid inputs ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:67:3
── Error ('test-stratified_uni_reg.R:100:3'): stratified_uni_reg works with robpoisson ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:100:3
── Error ('test-stratified_uni_reg.R:126:3'): stratified_uni_reg works with negbin ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-stratified_uni_reg.R:126:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:163:3'): stratified_uni_reg errors when no valid strata exist ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:163:3
── Error ('test-uni_reg.R:6:3'): uni_reg returns a gtsummary object and works with binary data ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─tidyr::drop_na(...) at test-uni_reg.R:6:3
2. └─dplyr::mutate(...)
── Error ('test-uni_reg.R:70:3'): uni_reg$ accessors return correct components ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─tidyr::drop_na(PimaIndiansDiabetes2) at test-uni_reg.R:70:3
[ FAIL 27 | WARN 29 | SKIP 1 | PASS 92 ]
Error:
! Test failures.
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 1.0.0
Check: tests
Result: ERROR
Running ‘testthat.R’ [41s/42s]
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(gtregression)
>
> test_check("gtregression")
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Saving _problems/test-check_collinearity-9.R
Saving _problems/test-check_collinearity-29.R
Saving _problems/test-check_convergence-19.R
Saving _problems/test-check_convergence-113.R
# A tibble: 18 x 6
Variable Type `Missing (%)` Unique Levels Compatibility
<chr> <chr> <chr> <int> <chr> <chr>
1 pregnant numeric 0% 17 - compatible
2 glucose numeric 0.7% 135 - compatible
3 pressure numeric 4.6% 46 - compatible
4 triceps numeric 29.6% 50 - compatible
5 insulin numeric 48.7% 185 - compatible
6 mass numeric 1.4% 247 - compatible
7 pedigree numeric 0% 517 - compatible
8 age numeric 0% 52 - compatible
9 diabetes numeric 0% 2 - maybe
10 bmi factor 1.4% 3 Normal, Overweight, ~ compatible
11 age_cat factor 0% 3 Young, Middle-aged, ~ compatible
12 npreg_cat factor 0% 2 Low parity, High par~ compatible
13 glucose_cat factor 0.7% 2 Normal, High compatible
14 bp_cat factor 4.6% 2 Normal, High compatible
15 triceps_cat factor 29.6% 2 Normal, High compatible
16 insulin_cat factor 48.7% 3 Low, Normal, High compatible
17 dpf_cat factor 0% 3 Low Genetic Risk, Mo~ compatible
18 diabetes_cat factor 0% 2 Diabetes negative, D~ compatible
Interpretation notes:
- compatible: ready to use in regression
- maybe: require transformation to factor or check no of levels
- incompatible: not usable as-is (e.g., all NA, <2 levels)
Saving _problems/test-fit_multi_model-23.R
Saving _problems/test-fit_uni_model-17.R
Saving _problems/test-fit_uni_model-59.R
Saving _problems/test-identify_confounder-27.R
Saving _problems/test-interaction_models-32.R
Saving _problems/test-interaction_models-64.R
Saving _problems/test-interaction_models-96.R
The number rows in the tables to be merged do not match, which may result in rows appearing out of order.
i See `tbl_merge()` (`?gtsummary::tbl_merge()`) help file for details. Use `quiet=TRUE` to silence message.
The number rows in the tables to be merged do not match, which may result in rows appearing out of order.
i See `tbl_merge()` (`?gtsummary::tbl_merge()`) help file for details. Use `quiet=TRUE` to silence message.
Saving _problems/test-multi_reg-50.R
Saving _problems/test-plot_reg-43.R
Saving _problems/test-plot_reg_combine-56.R
Table saved at: /tmp/Rtmp9zmVob/working_dir/RtmpGxvJNK/regression_results.docx
`height` was translated to `width`.
Plot saved at: /tmp/Rtmp9zmVob/working_dir/RtmpGxvJNK/plot_png.png
`height` was translated to `width`.
Plot saved at: /tmp/Rtmp9zmVob/working_dir/RtmpGxvJNK/plot_pdf.pdf
`height` was translated to `width`.
Plot saved at: /tmp/Rtmp9zmVob/working_dir/RtmpGxvJNK/plot_jpg.jpg
`height` was translated to `width`.
Word document saved at: /tmp/Rtmp9zmVob/working_dir/RtmpGxvJNK/final_report.docx
If tables or plots extend beyond the page, consider switching to landscape layout in Word (Layout > Orientation > Landscape).
Attaching package: 'MASS'
The following object is masked from 'package:gtsummary':
select
The following object is masked from 'package:dplyr':
select
Saving _problems/test-select_models-25.R
Saving _problems/test-stratified_multi_reg-32.R
Saving _problems/test-stratified_multi_reg-75.R
Saving _problems/test-stratified_multi_reg-120.R
Saving _problems/test-stratified_multi_reg-167.R
Saving _problems/test-stratified_uni_reg-21.R
Saving _problems/test-stratified_uni_reg-46.R
Saving _problems/test-stratified_uni_reg-71.R
Saving _problems/test-stratified_uni_reg-106.R
Saving _problems/test-stratified_uni_reg-142.R
Saving _problems/test-stratified_uni_reg-167.R
Saving _problems/test-uni_reg-10.R
Saving _problems/test-uni_reg-70.R
[ FAIL 27 | WARN 29 | SKIP 1 | PASS 92 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-dissect.R:1:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-check_collinearity.R:7:3'): check_collinearity works correctly for multivariable models ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-check_collinearity.R:7:3
2. └─dplyr::filter(PimaIndiansDiabetes2, !is.na(diabetes))
── Error ('test-check_collinearity.R:27:3'): check_collinearity throws error for univariate models ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-check_collinearity.R:27:3
2. └─dplyr::filter(PimaIndiansDiabetes2, !is.na(diabetes))
── Error ('test-check_convergence.R:4:3'): check_convergence runs correctly for valid approaches ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-check_convergence.R:4:3
── Error ('test-check_convergence.R:98:3'): check_convergence handles model fitting failure ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-check_convergence.R:98:3
── Error ('test-fit_multi_model.R:7:3'): .fit_multi_model returns correct model class for each approach ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-fit_multi_model.R:7:3
2. └─dplyr::mutate(...)
── Error ('test-fit_uni_model.R:7:3'): .fit_uni_model returns correct model class (PimaIndiansDiabetes2) ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-fit_uni_model.R:7:3
2. └─dplyr::mutate(...)
── Error ('test-fit_uni_model.R:55:3'): .fit_uni_model handles model fitting failure gracefully ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-fit_uni_model.R:55:3
── Error ('test-identify_confounder.R:6:3'): identify_confounder works across approaches using
change-in-estimate method ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-identify_confounder.R:6:3
── Error ('test-interaction_models.R:6:3'): interaction_models returns a list with expected names ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:6:3
2. └─dplyr::mutate(...)
── Error ('test-interaction_models.R:52:3'): interaction_models handles robpoisson approach ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:52:3
2. └─dplyr::mutate(...)
── Error ('test-interaction_models.R:84:3'): interaction_models errors with invalid approach ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:84:3
2. └─dplyr::mutate(...)
── Error ('test-multi_reg.R:11:3'): multi_reg computes estimates correctly across approaches ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-multi_reg.R:11:3
── Error ('test-plot_reg.R:9:3'): plot_reg works with default settings and correct X-axis labels ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-plot_reg.R:9:3
2. └─dplyr::mutate(...)
── Error ('test-plot_reg_combine.R:9:3'): plot_reg_combine works with various options ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-plot_reg_combine.R:9:3
── Error ('test-select_models.R:8:3'): select_models works for valid approaches and directions ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-select_models.R:8:3
── Error ('test-stratified_multi_reg.R:9:3'): stratified_multi_reg returns a gtsummary tbl_merge object ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:9:3
── Error ('test-stratified_multi_reg.R:61:3'): stratified_multi_reg excludes NA values in stratifier ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:61:3
── Error ('test-stratified_multi_reg.R:109:3'): stratified_multi_reg runs with robpoisson and produces estimates ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:109:3
── Error ('test-stratified_multi_reg.R:153:3'): stratified_multi_reg works with negbin ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-stratified_multi_reg.R:153:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:4:3'): stratified_uni_reg returns a gtsummary tbl_merge object with logit ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-stratified_uni_reg.R:4:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:40:3'): stratified_uni_reg excludes NA values in stratifier ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:40:3
── Error ('test-stratified_uni_reg.R:67:3'): stratified_uni_reg errors for invalid inputs ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:67:3
── Error ('test-stratified_uni_reg.R:100:3'): stratified_uni_reg works with robpoisson ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:100:3
── Error ('test-stratified_uni_reg.R:126:3'): stratified_uni_reg works with negbin ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-stratified_uni_reg.R:126:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:163:3'): stratified_uni_reg errors when no valid strata exist ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:163:3
── Error ('test-uni_reg.R:6:3'): uni_reg returns a gtsummary object and works with binary data ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─tidyr::drop_na(...) at test-uni_reg.R:6:3
2. └─dplyr::mutate(...)
── Error ('test-uni_reg.R:70:3'): uni_reg$ accessors return correct components ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─tidyr::drop_na(PimaIndiansDiabetes2) at test-uni_reg.R:70:3
[ FAIL 27 | WARN 29 | SKIP 1 | PASS 92 ]
Error:
! Test failures.
Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc
Version: 1.0.0
Check: tests
Result: ERROR
Running 'testthat.R' [49s]
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(gtregression)
>
> test_check("gtregression")
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Saving _problems/test-check_collinearity-9.R
Saving _problems/test-check_collinearity-29.R
Saving _problems/test-check_convergence-19.R
Saving _problems/test-check_convergence-113.R
# A tibble: 18 x 6
Variable Type `Missing (%)` Unique Levels Compatibility
<chr> <chr> <chr> <int> <chr> <chr>
1 pregnant numeric 0% 17 - compatible
2 glucose numeric 0.7% 135 - compatible
3 pressure numeric 4.6% 46 - compatible
4 triceps numeric 29.6% 50 - compatible
5 insulin numeric 48.7% 185 - compatible
6 mass numeric 1.4% 247 - compatible
7 pedigree numeric 0% 517 - compatible
8 age numeric 0% 52 - compatible
9 diabetes numeric 0% 2 - maybe
10 bmi factor 1.4% 3 Normal, Overweight, ~ compatible
11 age_cat factor 0% 3 Young, Middle-aged, ~ compatible
12 npreg_cat factor 0% 2 Low parity, High par~ compatible
13 glucose_cat factor 0.7% 2 Normal, High compatible
14 bp_cat factor 4.6% 2 Normal, High compatible
15 triceps_cat factor 29.6% 2 Normal, High compatible
16 insulin_cat factor 48.7% 3 Low, Normal, High compatible
17 dpf_cat factor 0% 3 Low Genetic Risk, Mo~ compatible
18 diabetes_cat factor 0% 2 Diabetes negative, D~ compatible
Interpretation notes:
- compatible: ready to use in regression
- maybe: require transformation to factor or check no of levels
- incompatible: not usable as-is (e.g., all NA, <2 levels)
Saving _problems/test-fit_multi_model-23.R
Saving _problems/test-fit_uni_model-17.R
Saving _problems/test-fit_uni_model-59.R
Saving _problems/test-identify_confounder-27.R
Saving _problems/test-interaction_models-32.R
Saving _problems/test-interaction_models-64.R
Saving _problems/test-interaction_models-96.R
The number rows in the tables to be merged do not match, which may result in rows appearing out of order.
i See `tbl_merge()` (`?gtsummary::tbl_merge()`) help file for details. Use `quiet=TRUE` to silence message.
The number rows in the tables to be merged do not match, which may result in rows appearing out of order.
i See `tbl_merge()` (`?gtsummary::tbl_merge()`) help file for details. Use `quiet=TRUE` to silence message.
Saving _problems/test-multi_reg-50.R
Saving _problems/test-plot_reg-43.R
Saving _problems/test-plot_reg_combine-56.R
Table saved at: D:\temp\2026_07_29_01_50_00_30317\RtmpYTVAcH\regression_results.docx
`height` was translated to `width`.
Plot saved at: D:\temp\2026_07_29_01_50_00_30317\RtmpYTVAcH\plot_png.png
`height` was translated to `width`.
Plot saved at: D:\temp\2026_07_29_01_50_00_30317\RtmpYTVAcH\plot_pdf.pdf
`height` was translated to `width`.
Plot saved at: D:\temp\2026_07_29_01_50_00_30317\RtmpYTVAcH\plot_jpg.jpg
`height` was translated to `width`.
Word document saved at: D:\temp\2026_07_29_01_50_00_30317\RtmpYTVAcH\final_report.docx
If tables or plots extend beyond the page, consider switching to landscape layout in Word (Layout > Orientation > Landscape).
Attaching package: 'MASS'
The following object is masked from 'package:gtsummary':
select
The following object is masked from 'package:dplyr':
select
Saving _problems/test-select_models-25.R
Saving _problems/test-stratified_multi_reg-32.R
Saving _problems/test-stratified_multi_reg-75.R
Saving _problems/test-stratified_multi_reg-120.R
Saving _problems/test-stratified_multi_reg-167.R
Saving _problems/test-stratified_uni_reg-21.R
Saving _problems/test-stratified_uni_reg-46.R
Saving _problems/test-stratified_uni_reg-71.R
Saving _problems/test-stratified_uni_reg-106.R
Saving _problems/test-stratified_uni_reg-142.R
Saving _problems/test-stratified_uni_reg-167.R
Saving _problems/test-uni_reg-10.R
Saving _problems/test-uni_reg-70.R
[ FAIL 27 | WARN 29 | SKIP 1 | PASS 92 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-dissect.R:1:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-check_collinearity.R:7:3'): check_collinearity works correctly for multivariable models ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-check_collinearity.R:7:3
2. └─dplyr::filter(PimaIndiansDiabetes2, !is.na(diabetes))
── Error ('test-check_collinearity.R:27:3'): check_collinearity throws error for univariate models ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-check_collinearity.R:27:3
2. └─dplyr::filter(PimaIndiansDiabetes2, !is.na(diabetes))
── Error ('test-check_convergence.R:4:3'): check_convergence runs correctly for valid approaches ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-check_convergence.R:4:3
── Error ('test-check_convergence.R:98:3'): check_convergence handles model fitting failure ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-check_convergence.R:98:3
── Error ('test-fit_multi_model.R:7:3'): .fit_multi_model returns correct model class for each approach ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-fit_multi_model.R:7:3
2. └─dplyr::mutate(...)
── Error ('test-fit_uni_model.R:7:3'): .fit_uni_model returns correct model class (PimaIndiansDiabetes2) ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-fit_uni_model.R:7:3
2. └─dplyr::mutate(...)
── Error ('test-fit_uni_model.R:55:3'): .fit_uni_model handles model fitting failure gracefully ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-fit_uni_model.R:55:3
── Error ('test-identify_confounder.R:6:3'): identify_confounder works across approaches using
change-in-estimate method ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-identify_confounder.R:6:3
── Error ('test-interaction_models.R:6:3'): interaction_models returns a list with expected names ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:6:3
2. └─dplyr::mutate(...)
── Error ('test-interaction_models.R:52:3'): interaction_models handles robpoisson approach ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:52:3
2. └─dplyr::mutate(...)
── Error ('test-interaction_models.R:84:3'): interaction_models errors with invalid approach ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:84:3
2. └─dplyr::mutate(...)
── Error ('test-multi_reg.R:11:3'): multi_reg computes estimates correctly across approaches ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-multi_reg.R:11:3
── Error ('test-plot_reg.R:9:3'): plot_reg works with default settings and correct X-axis labels ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-plot_reg.R:9:3
2. └─dplyr::mutate(...)
── Error ('test-plot_reg_combine.R:9:3'): plot_reg_combine works with various options ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-plot_reg_combine.R:9:3
── Error ('test-select_models.R:8:3'): select_models works for valid approaches and directions ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-select_models.R:8:3
── Error ('test-stratified_multi_reg.R:9:3'): stratified_multi_reg returns a gtsummary tbl_merge object ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:9:3
── Error ('test-stratified_multi_reg.R:61:3'): stratified_multi_reg excludes NA values in stratifier ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:61:3
── Error ('test-stratified_multi_reg.R:109:3'): stratified_multi_reg runs with robpoisson and produces estimates ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:109:3
── Error ('test-stratified_multi_reg.R:153:3'): stratified_multi_reg works with negbin ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-stratified_multi_reg.R:153:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:4:3'): stratified_uni_reg returns a gtsummary tbl_merge object with logit ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-stratified_uni_reg.R:4:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:40:3'): stratified_uni_reg excludes NA values in stratifier ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:40:3
── Error ('test-stratified_uni_reg.R:67:3'): stratified_uni_reg errors for invalid inputs ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:67:3
── Error ('test-stratified_uni_reg.R:100:3'): stratified_uni_reg works with robpoisson ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:100:3
── Error ('test-stratified_uni_reg.R:126:3'): stratified_uni_reg works with negbin ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-stratified_uni_reg.R:126:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:163:3'): stratified_uni_reg errors when no valid strata exist ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:163:3
── Error ('test-uni_reg.R:6:3'): uni_reg returns a gtsummary object and works with binary data ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─tidyr::drop_na(...) at test-uni_reg.R:6:3
2. └─dplyr::mutate(...)
── Error ('test-uni_reg.R:70:3'): uni_reg$ accessors return correct components ──
<objectNotFoundError/error/condition>
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─tidyr::drop_na(PimaIndiansDiabetes2) at test-uni_reg.R:70:3
[ FAIL 27 | WARN 29 | SKIP 1 | PASS 92 ]
Error:
! Test failures.
Execution halted
Flavor: r-devel-windows-x86_64
Version: 1.0.0
Check: tests
Result: ERROR
Running ‘testthat.R’ [60s/78s]
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(gtregression)
>
> test_check("gtregression")
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Saving _problems/test-check_collinearity-9.R
Saving _problems/test-check_collinearity-29.R
Saving _problems/test-check_convergence-19.R
Saving _problems/test-check_convergence-113.R
# A tibble: 18 x 6
Variable Type `Missing (%)` Unique Levels Compatibility
<chr> <chr> <chr> <int> <chr> <chr>
1 pregnant numeric 0% 17 - compatible
2 glucose numeric 0.7% 135 - compatible
3 pressure numeric 4.6% 46 - compatible
4 triceps numeric 29.6% 50 - compatible
5 insulin numeric 48.7% 185 - compatible
6 mass numeric 1.4% 247 - compatible
7 pedigree numeric 0% 517 - compatible
8 age numeric 0% 52 - compatible
9 diabetes numeric 0% 2 - maybe
10 bmi factor 1.4% 3 Normal, Overweight, ~ compatible
11 age_cat factor 0% 3 Young, Middle-aged, ~ compatible
12 npreg_cat factor 0% 2 Low parity, High par~ compatible
13 glucose_cat factor 0.7% 2 Normal, High compatible
14 bp_cat factor 4.6% 2 Normal, High compatible
15 triceps_cat factor 29.6% 2 Normal, High compatible
16 insulin_cat factor 48.7% 3 Low, Normal, High compatible
17 dpf_cat factor 0% 3 Low Genetic Risk, Mo~ compatible
18 diabetes_cat factor 0% 2 Diabetes negative, D~ compatible
Interpretation notes:
- compatible: ready to use in regression
- maybe: require transformation to factor or check no of levels
- incompatible: not usable as-is (e.g., all NA, <2 levels)
Saving _problems/test-fit_multi_model-23.R
Saving _problems/test-fit_uni_model-17.R
Saving _problems/test-fit_uni_model-59.R
Saving _problems/test-identify_confounder-27.R
Saving _problems/test-interaction_models-32.R
Saving _problems/test-interaction_models-64.R
Saving _problems/test-interaction_models-96.R
The number rows in the tables to be merged do not match, which may result in rows appearing out of order.
i See `tbl_merge()` (`?gtsummary::tbl_merge()`) help file for details. Use `quiet=TRUE` to silence message.
The number rows in the tables to be merged do not match, which may result in rows appearing out of order.
i See `tbl_merge()` (`?gtsummary::tbl_merge()`) help file for details. Use `quiet=TRUE` to silence message.
Saving _problems/test-multi_reg-50.R
Saving _problems/test-plot_reg-43.R
Saving _problems/test-plot_reg_combine-56.R
Table saved at: /home/hornik/tmp/scratch/Rtmpambp9M/regression_results.docx
`height` was translated to `width`.
Plot saved at: /home/hornik/tmp/scratch/Rtmpambp9M/plot_png.png
`height` was translated to `width`.
Plot saved at: /home/hornik/tmp/scratch/Rtmpambp9M/plot_pdf.pdf
`height` was translated to `width`.
Plot saved at: /home/hornik/tmp/scratch/Rtmpambp9M/plot_jpg.jpg
`height` was translated to `width`.
Word document saved at: /home/hornik/tmp/scratch/Rtmpambp9M/final_report.docx
If tables or plots extend beyond the page, consider switching to landscape layout in Word (Layout > Orientation > Landscape).
Attaching package: 'MASS'
The following object is masked from 'package:gtsummary':
select
The following object is masked from 'package:dplyr':
select
Saving _problems/test-select_models-25.R
Saving _problems/test-stratified_multi_reg-32.R
Saving _problems/test-stratified_multi_reg-75.R
Saving _problems/test-stratified_multi_reg-120.R
Saving _problems/test-stratified_multi_reg-167.R
Saving _problems/test-stratified_uni_reg-21.R
Saving _problems/test-stratified_uni_reg-46.R
Saving _problems/test-stratified_uni_reg-71.R
Saving _problems/test-stratified_uni_reg-106.R
Saving _problems/test-stratified_uni_reg-142.R
Saving _problems/test-stratified_uni_reg-167.R
Saving _problems/test-uni_reg-10.R
Saving _problems/test-uni_reg-70.R
[ FAIL 27 | WARN 29 | SKIP 1 | PASS 92 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-dissect.R:1:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-check_collinearity.R:7:3'): check_collinearity works correctly for multivariable models ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-check_collinearity.R:7:3
2. └─dplyr::filter(PimaIndiansDiabetes2, !is.na(diabetes))
── Error ('test-check_collinearity.R:27:3'): check_collinearity throws error for univariate models ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-check_collinearity.R:27:3
2. └─dplyr::filter(PimaIndiansDiabetes2, !is.na(diabetes))
── Error ('test-check_convergence.R:4:3'): check_convergence runs correctly for valid approaches ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-check_convergence.R:4:3
── Error ('test-check_convergence.R:98:3'): check_convergence handles model fitting failure ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-check_convergence.R:98:3
── Error ('test-fit_multi_model.R:7:3'): .fit_multi_model returns correct model class for each approach ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-fit_multi_model.R:7:3
2. └─dplyr::mutate(...)
── Error ('test-fit_uni_model.R:7:3'): .fit_uni_model returns correct model class (PimaIndiansDiabetes2) ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-fit_uni_model.R:7:3
2. └─dplyr::mutate(...)
── Error ('test-fit_uni_model.R:55:3'): .fit_uni_model handles model fitting failure gracefully ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-fit_uni_model.R:55:3
── Error ('test-identify_confounder.R:6:3'): identify_confounder works across approaches using
change-in-estimate method ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-identify_confounder.R:6:3
── Error ('test-interaction_models.R:6:3'): interaction_models returns a list with expected names ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:6:3
2. └─dplyr::mutate(...)
── Error ('test-interaction_models.R:52:3'): interaction_models handles robpoisson approach ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:52:3
2. └─dplyr::mutate(...)
── Error ('test-interaction_models.R:84:3'): interaction_models errors with invalid approach ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:84:3
2. └─dplyr::mutate(...)
── Error ('test-multi_reg.R:11:3'): multi_reg computes estimates correctly across approaches ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-multi_reg.R:11:3
── Error ('test-plot_reg.R:9:3'): plot_reg works with default settings and correct X-axis labels ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-plot_reg.R:9:3
2. └─dplyr::mutate(...)
── Error ('test-plot_reg_combine.R:9:3'): plot_reg_combine works with various options ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-plot_reg_combine.R:9:3
── Error ('test-select_models.R:8:3'): select_models works for valid approaches and directions ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-select_models.R:8:3
── Error ('test-stratified_multi_reg.R:9:3'): stratified_multi_reg returns a gtsummary tbl_merge object ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:9:3
── Error ('test-stratified_multi_reg.R:61:3'): stratified_multi_reg excludes NA values in stratifier ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:61:3
── Error ('test-stratified_multi_reg.R:109:3'): stratified_multi_reg runs with robpoisson and produces estimates ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:109:3
── Error ('test-stratified_multi_reg.R:153:3'): stratified_multi_reg works with negbin ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-stratified_multi_reg.R:153:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:4:3'): stratified_uni_reg returns a gtsummary tbl_merge object with logit ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-stratified_uni_reg.R:4:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:40:3'): stratified_uni_reg excludes NA values in stratifier ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:40:3
── Error ('test-stratified_uni_reg.R:67:3'): stratified_uni_reg errors for invalid inputs ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:67:3
── Error ('test-stratified_uni_reg.R:100:3'): stratified_uni_reg works with robpoisson ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:100:3
── Error ('test-stratified_uni_reg.R:126:3'): stratified_uni_reg works with negbin ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-stratified_uni_reg.R:126:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:163:3'): stratified_uni_reg errors when no valid strata exist ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:163:3
── Error ('test-uni_reg.R:6:3'): uni_reg returns a gtsummary object and works with binary data ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─tidyr::drop_na(...) at test-uni_reg.R:6:3
2. └─dplyr::mutate(...)
── Error ('test-uni_reg.R:70:3'): uni_reg$ accessors return correct components ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─tidyr::drop_na(PimaIndiansDiabetes2) at test-uni_reg.R:70:3
[ FAIL 27 | WARN 29 | SKIP 1 | PASS 92 ]
Error:
! Test failures.
Execution halted
Flavor: r-patched-linux-x86_64
Version: 1.0.0
Check: tests
Result: ERROR
Running ‘testthat.R’ [60s/74s]
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(gtregression)
>
> test_check("gtregression")
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Saving _problems/test-check_collinearity-9.R
Saving _problems/test-check_collinearity-29.R
Saving _problems/test-check_convergence-19.R
Saving _problems/test-check_convergence-113.R
# A tibble: 18 x 6
Variable Type `Missing (%)` Unique Levels Compatibility
<chr> <chr> <chr> <int> <chr> <chr>
1 pregnant numeric 0% 17 - compatible
2 glucose numeric 0.7% 135 - compatible
3 pressure numeric 4.6% 46 - compatible
4 triceps numeric 29.6% 50 - compatible
5 insulin numeric 48.7% 185 - compatible
6 mass numeric 1.4% 247 - compatible
7 pedigree numeric 0% 517 - compatible
8 age numeric 0% 52 - compatible
9 diabetes numeric 0% 2 - maybe
10 bmi factor 1.4% 3 Normal, Overweight, ~ compatible
11 age_cat factor 0% 3 Young, Middle-aged, ~ compatible
12 npreg_cat factor 0% 2 Low parity, High par~ compatible
13 glucose_cat factor 0.7% 2 Normal, High compatible
14 bp_cat factor 4.6% 2 Normal, High compatible
15 triceps_cat factor 29.6% 2 Normal, High compatible
16 insulin_cat factor 48.7% 3 Low, Normal, High compatible
17 dpf_cat factor 0% 3 Low Genetic Risk, Mo~ compatible
18 diabetes_cat factor 0% 2 Diabetes negative, D~ compatible
Interpretation notes:
- compatible: ready to use in regression
- maybe: require transformation to factor or check no of levels
- incompatible: not usable as-is (e.g., all NA, <2 levels)
Saving _problems/test-fit_multi_model-23.R
Saving _problems/test-fit_uni_model-17.R
Saving _problems/test-fit_uni_model-59.R
Saving _problems/test-identify_confounder-27.R
Saving _problems/test-interaction_models-32.R
Saving _problems/test-interaction_models-64.R
Saving _problems/test-interaction_models-96.R
The number rows in the tables to be merged do not match, which may result in rows appearing out of order.
i See `tbl_merge()` (`?gtsummary::tbl_merge()`) help file for details. Use `quiet=TRUE` to silence message.
The number rows in the tables to be merged do not match, which may result in rows appearing out of order.
i See `tbl_merge()` (`?gtsummary::tbl_merge()`) help file for details. Use `quiet=TRUE` to silence message.
Saving _problems/test-multi_reg-50.R
Saving _problems/test-plot_reg-43.R
Saving _problems/test-plot_reg_combine-56.R
Table saved at: /home/hornik/tmp/scratch/RtmpQrj0t6/regression_results.docx
`height` was translated to `width`.
Plot saved at: /home/hornik/tmp/scratch/RtmpQrj0t6/plot_png.png
`height` was translated to `width`.
Plot saved at: /home/hornik/tmp/scratch/RtmpQrj0t6/plot_pdf.pdf
`height` was translated to `width`.
Plot saved at: /home/hornik/tmp/scratch/RtmpQrj0t6/plot_jpg.jpg
`height` was translated to `width`.
Word document saved at: /home/hornik/tmp/scratch/RtmpQrj0t6/final_report.docx
If tables or plots extend beyond the page, consider switching to landscape layout in Word (Layout > Orientation > Landscape).
Attaching package: 'MASS'
The following object is masked from 'package:gtsummary':
select
The following object is masked from 'package:dplyr':
select
Saving _problems/test-select_models-25.R
Saving _problems/test-stratified_multi_reg-32.R
Saving _problems/test-stratified_multi_reg-75.R
Saving _problems/test-stratified_multi_reg-120.R
Saving _problems/test-stratified_multi_reg-167.R
Saving _problems/test-stratified_uni_reg-21.R
Saving _problems/test-stratified_uni_reg-46.R
Saving _problems/test-stratified_uni_reg-71.R
Saving _problems/test-stratified_uni_reg-106.R
Saving _problems/test-stratified_uni_reg-142.R
Saving _problems/test-stratified_uni_reg-167.R
Saving _problems/test-uni_reg-10.R
Saving _problems/test-uni_reg-70.R
[ FAIL 27 | WARN 29 | SKIP 1 | PASS 92 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-dissect.R:1:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-check_collinearity.R:7:3'): check_collinearity works correctly for multivariable models ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-check_collinearity.R:7:3
2. └─dplyr::filter(PimaIndiansDiabetes2, !is.na(diabetes))
── Error ('test-check_collinearity.R:27:3'): check_collinearity throws error for univariate models ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-check_collinearity.R:27:3
2. └─dplyr::filter(PimaIndiansDiabetes2, !is.na(diabetes))
── Error ('test-check_convergence.R:4:3'): check_convergence runs correctly for valid approaches ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-check_convergence.R:4:3
── Error ('test-check_convergence.R:98:3'): check_convergence handles model fitting failure ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-check_convergence.R:98:3
── Error ('test-fit_multi_model.R:7:3'): .fit_multi_model returns correct model class for each approach ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-fit_multi_model.R:7:3
2. └─dplyr::mutate(...)
── Error ('test-fit_uni_model.R:7:3'): .fit_uni_model returns correct model class (PimaIndiansDiabetes2) ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-fit_uni_model.R:7:3
2. └─dplyr::mutate(...)
── Error ('test-fit_uni_model.R:55:3'): .fit_uni_model handles model fitting failure gracefully ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-fit_uni_model.R:55:3
── Error ('test-identify_confounder.R:6:3'): identify_confounder works across approaches using
change-in-estimate method ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-identify_confounder.R:6:3
── Error ('test-interaction_models.R:6:3'): interaction_models returns a list with expected names ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:6:3
2. └─dplyr::mutate(...)
── Error ('test-interaction_models.R:52:3'): interaction_models handles robpoisson approach ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:52:3
2. └─dplyr::mutate(...)
── Error ('test-interaction_models.R:84:3'): interaction_models errors with invalid approach ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:84:3
2. └─dplyr::mutate(...)
── Error ('test-multi_reg.R:11:3'): multi_reg computes estimates correctly across approaches ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-multi_reg.R:11:3
── Error ('test-plot_reg.R:9:3'): plot_reg works with default settings and correct X-axis labels ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-plot_reg.R:9:3
2. └─dplyr::mutate(...)
── Error ('test-plot_reg_combine.R:9:3'): plot_reg_combine works with various options ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-plot_reg_combine.R:9:3
── Error ('test-select_models.R:8:3'): select_models works for valid approaches and directions ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-select_models.R:8:3
── Error ('test-stratified_multi_reg.R:9:3'): stratified_multi_reg returns a gtsummary tbl_merge object ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:9:3
── Error ('test-stratified_multi_reg.R:61:3'): stratified_multi_reg excludes NA values in stratifier ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:61:3
── Error ('test-stratified_multi_reg.R:109:3'): stratified_multi_reg runs with robpoisson and produces estimates ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:109:3
── Error ('test-stratified_multi_reg.R:153:3'): stratified_multi_reg works with negbin ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-stratified_multi_reg.R:153:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:4:3'): stratified_uni_reg returns a gtsummary tbl_merge object with logit ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-stratified_uni_reg.R:4:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:40:3'): stratified_uni_reg excludes NA values in stratifier ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:40:3
── Error ('test-stratified_uni_reg.R:67:3'): stratified_uni_reg errors for invalid inputs ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:67:3
── Error ('test-stratified_uni_reg.R:100:3'): stratified_uni_reg works with robpoisson ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:100:3
── Error ('test-stratified_uni_reg.R:126:3'): stratified_uni_reg works with negbin ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-stratified_uni_reg.R:126:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:163:3'): stratified_uni_reg errors when no valid strata exist ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:163:3
── Error ('test-uni_reg.R:6:3'): uni_reg returns a gtsummary object and works with binary data ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─tidyr::drop_na(...) at test-uni_reg.R:6:3
2. └─dplyr::mutate(...)
── Error ('test-uni_reg.R:70:3'): uni_reg$ accessors return correct components ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─tidyr::drop_na(PimaIndiansDiabetes2) at test-uni_reg.R:70:3
[ FAIL 27 | WARN 29 | SKIP 1 | PASS 92 ]
Error:
! Test failures.
Execution halted
Flavor: r-release-linux-x86_64
Version: 1.0.0
Check: tests
Result: ERROR
Running 'testthat.R' [49s]
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(gtregression)
>
> test_check("gtregression")
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Saving _problems/test-check_collinearity-9.R
Saving _problems/test-check_collinearity-29.R
Saving _problems/test-check_convergence-19.R
Saving _problems/test-check_convergence-113.R
# A tibble: 18 x 6
Variable Type `Missing (%)` Unique Levels Compatibility
<chr> <chr> <chr> <int> <chr> <chr>
1 pregnant numeric 0% 17 - compatible
2 glucose numeric 0.7% 135 - compatible
3 pressure numeric 4.6% 46 - compatible
4 triceps numeric 29.6% 50 - compatible
5 insulin numeric 48.7% 185 - compatible
6 mass numeric 1.4% 247 - compatible
7 pedigree numeric 0% 517 - compatible
8 age numeric 0% 52 - compatible
9 diabetes numeric 0% 2 - maybe
10 bmi factor 1.4% 3 Normal, Overweight, ~ compatible
11 age_cat factor 0% 3 Young, Middle-aged, ~ compatible
12 npreg_cat factor 0% 2 Low parity, High par~ compatible
13 glucose_cat factor 0.7% 2 Normal, High compatible
14 bp_cat factor 4.6% 2 Normal, High compatible
15 triceps_cat factor 29.6% 2 Normal, High compatible
16 insulin_cat factor 48.7% 3 Low, Normal, High compatible
17 dpf_cat factor 0% 3 Low Genetic Risk, Mo~ compatible
18 diabetes_cat factor 0% 2 Diabetes negative, D~ compatible
Interpretation notes:
- compatible: ready to use in regression
- maybe: require transformation to factor or check no of levels
- incompatible: not usable as-is (e.g., all NA, <2 levels)
Saving _problems/test-fit_multi_model-23.R
Saving _problems/test-fit_uni_model-17.R
Saving _problems/test-fit_uni_model-59.R
Saving _problems/test-identify_confounder-27.R
Saving _problems/test-interaction_models-32.R
Saving _problems/test-interaction_models-64.R
Saving _problems/test-interaction_models-96.R
The number rows in the tables to be merged do not match, which may result in rows appearing out of order.
i See `tbl_merge()` (`?gtsummary::tbl_merge()`) help file for details. Use `quiet=TRUE` to silence message.
The number rows in the tables to be merged do not match, which may result in rows appearing out of order.
i See `tbl_merge()` (`?gtsummary::tbl_merge()`) help file for details. Use `quiet=TRUE` to silence message.
Saving _problems/test-multi_reg-50.R
Saving _problems/test-plot_reg-43.R
Saving _problems/test-plot_reg_combine-56.R
Table saved at: D:\temp\2026_07_30_01_50_00_17551\RtmpY56ABD\regression_results.docx
`height` was translated to `width`.
Plot saved at: D:\temp\2026_07_30_01_50_00_17551\RtmpY56ABD\plot_png.png
`height` was translated to `width`.
Plot saved at: D:\temp\2026_07_30_01_50_00_17551\RtmpY56ABD\plot_pdf.pdf
`height` was translated to `width`.
Plot saved at: D:\temp\2026_07_30_01_50_00_17551\RtmpY56ABD\plot_jpg.jpg
`height` was translated to `width`.
Word document saved at: D:\temp\2026_07_30_01_50_00_17551\RtmpY56ABD\final_report.docx
If tables or plots extend beyond the page, consider switching to landscape layout in Word (Layout > Orientation > Landscape).
Attaching package: 'MASS'
The following object is masked from 'package:gtsummary':
select
The following object is masked from 'package:dplyr':
select
Saving _problems/test-select_models-25.R
Saving _problems/test-stratified_multi_reg-32.R
Saving _problems/test-stratified_multi_reg-75.R
Saving _problems/test-stratified_multi_reg-120.R
Saving _problems/test-stratified_multi_reg-167.R
Saving _problems/test-stratified_uni_reg-21.R
Saving _problems/test-stratified_uni_reg-46.R
Saving _problems/test-stratified_uni_reg-71.R
Saving _problems/test-stratified_uni_reg-106.R
Saving _problems/test-stratified_uni_reg-142.R
Saving _problems/test-stratified_uni_reg-167.R
Saving _problems/test-uni_reg-10.R
Saving _problems/test-uni_reg-70.R
[ FAIL 27 | WARN 29 | SKIP 1 | PASS 92 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-dissect.R:1:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-check_collinearity.R:7:3'): check_collinearity works correctly for multivariable models ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-check_collinearity.R:7:3
2. └─dplyr::filter(PimaIndiansDiabetes2, !is.na(diabetes))
── Error ('test-check_collinearity.R:27:3'): check_collinearity throws error for univariate models ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-check_collinearity.R:27:3
2. └─dplyr::filter(PimaIndiansDiabetes2, !is.na(diabetes))
── Error ('test-check_convergence.R:4:3'): check_convergence runs correctly for valid approaches ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-check_convergence.R:4:3
── Error ('test-check_convergence.R:98:3'): check_convergence handles model fitting failure ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-check_convergence.R:98:3
── Error ('test-fit_multi_model.R:7:3'): .fit_multi_model returns correct model class for each approach ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-fit_multi_model.R:7:3
2. └─dplyr::mutate(...)
── Error ('test-fit_uni_model.R:7:3'): .fit_uni_model returns correct model class (PimaIndiansDiabetes2) ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-fit_uni_model.R:7:3
2. └─dplyr::mutate(...)
── Error ('test-fit_uni_model.R:55:3'): .fit_uni_model handles model fitting failure gracefully ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-fit_uni_model.R:55:3
── Error ('test-identify_confounder.R:6:3'): identify_confounder works across approaches using
change-in-estimate method ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-identify_confounder.R:6:3
── Error ('test-interaction_models.R:6:3'): interaction_models returns a list with expected names ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:6:3
2. └─dplyr::mutate(...)
── Error ('test-interaction_models.R:52:3'): interaction_models handles robpoisson approach ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:52:3
2. └─dplyr::mutate(...)
── Error ('test-interaction_models.R:84:3'): interaction_models errors with invalid approach ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:84:3
2. └─dplyr::mutate(...)
── Error ('test-multi_reg.R:11:3'): multi_reg computes estimates correctly across approaches ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-multi_reg.R:11:3
── Error ('test-plot_reg.R:9:3'): plot_reg works with default settings and correct X-axis labels ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-plot_reg.R:9:3
2. └─dplyr::mutate(...)
── Error ('test-plot_reg_combine.R:9:3'): plot_reg_combine works with various options ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-plot_reg_combine.R:9:3
── Error ('test-select_models.R:8:3'): select_models works for valid approaches and directions ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-select_models.R:8:3
── Error ('test-stratified_multi_reg.R:9:3'): stratified_multi_reg returns a gtsummary tbl_merge object ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:9:3
── Error ('test-stratified_multi_reg.R:61:3'): stratified_multi_reg excludes NA values in stratifier ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:61:3
── Error ('test-stratified_multi_reg.R:109:3'): stratified_multi_reg runs with robpoisson and produces estimates ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:109:3
── Error ('test-stratified_multi_reg.R:153:3'): stratified_multi_reg works with negbin ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-stratified_multi_reg.R:153:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:4:3'): stratified_uni_reg returns a gtsummary tbl_merge object with logit ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-stratified_uni_reg.R:4:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:40:3'): stratified_uni_reg excludes NA values in stratifier ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:40:3
── Error ('test-stratified_uni_reg.R:67:3'): stratified_uni_reg errors for invalid inputs ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:67:3
── Error ('test-stratified_uni_reg.R:100:3'): stratified_uni_reg works with robpoisson ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:100:3
── Error ('test-stratified_uni_reg.R:126:3'): stratified_uni_reg works with negbin ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-stratified_uni_reg.R:126:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:163:3'): stratified_uni_reg errors when no valid strata exist ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:163:3
── Error ('test-uni_reg.R:6:3'): uni_reg returns a gtsummary object and works with binary data ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─tidyr::drop_na(...) at test-uni_reg.R:6:3
2. └─dplyr::mutate(...)
── Error ('test-uni_reg.R:70:3'): uni_reg$ accessors return correct components ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─tidyr::drop_na(PimaIndiansDiabetes2) at test-uni_reg.R:70:3
[ FAIL 27 | WARN 29 | SKIP 1 | PASS 92 ]
Error:
! Test failures.
Execution halted
Flavor: r-release-windows-x86_64
Version: 1.0.0
Check: tests
Result: ERROR
Running 'testthat.R' [76s]
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(gtregression)
>
> test_check("gtregression")
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Saving _problems/test-check_collinearity-9.R
Saving _problems/test-check_collinearity-29.R
Saving _problems/test-check_convergence-19.R
Saving _problems/test-check_convergence-113.R
# A tibble: 18 x 6
Variable Type `Missing (%)` Unique Levels Compatibility
<chr> <chr> <chr> <int> <chr> <chr>
1 pregnant numeric 0% 17 - compatible
2 glucose numeric 0.7% 135 - compatible
3 pressure numeric 4.6% 46 - compatible
4 triceps numeric 29.6% 50 - compatible
5 insulin numeric 48.7% 185 - compatible
6 mass numeric 1.4% 247 - compatible
7 pedigree numeric 0% 517 - compatible
8 age numeric 0% 52 - compatible
9 diabetes numeric 0% 2 - maybe
10 bmi factor 1.4% 3 Normal, Overweight, ~ compatible
11 age_cat factor 0% 3 Young, Middle-aged, ~ compatible
12 npreg_cat factor 0% 2 Low parity, High par~ compatible
13 glucose_cat factor 0.7% 2 Normal, High compatible
14 bp_cat factor 4.6% 2 Normal, High compatible
15 triceps_cat factor 29.6% 2 Normal, High compatible
16 insulin_cat factor 48.7% 3 Low, Normal, High compatible
17 dpf_cat factor 0% 3 Low Genetic Risk, Mo~ compatible
18 diabetes_cat factor 0% 2 Diabetes negative, D~ compatible
Interpretation notes:
- compatible: ready to use in regression
- maybe: require transformation to factor or check no of levels
- incompatible: not usable as-is (e.g., all NA, <2 levels)
Saving _problems/test-fit_multi_model-23.R
Saving _problems/test-fit_uni_model-17.R
Saving _problems/test-fit_uni_model-59.R
Saving _problems/test-identify_confounder-27.R
Saving _problems/test-interaction_models-32.R
Saving _problems/test-interaction_models-64.R
Saving _problems/test-interaction_models-96.R
The number rows in the tables to be merged do not match, which may result in rows appearing out of order.
i See `tbl_merge()` (`?gtsummary::tbl_merge()`) help file for details. Use `quiet=TRUE` to silence message.
The number rows in the tables to be merged do not match, which may result in rows appearing out of order.
i See `tbl_merge()` (`?gtsummary::tbl_merge()`) help file for details. Use `quiet=TRUE` to silence message.
Saving _problems/test-multi_reg-50.R
Saving _problems/test-plot_reg-43.R
Saving _problems/test-plot_reg_combine-56.R
Table saved at: D:\temp\2026_07_28_14_23_56_26965\RtmpeSvI23\regression_results.docx
`height` was translated to `width`.
Plot saved at: D:\temp\2026_07_28_14_23_56_26965\RtmpeSvI23\plot_png.png
`height` was translated to `width`.
Plot saved at: D:\temp\2026_07_28_14_23_56_26965\RtmpeSvI23\plot_pdf.pdf
`height` was translated to `width`.
Plot saved at: D:\temp\2026_07_28_14_23_56_26965\RtmpeSvI23\plot_jpg.jpg
`height` was translated to `width`.
Word document saved at: D:\temp\2026_07_28_14_23_56_26965\RtmpeSvI23\final_report.docx
If tables or plots extend beyond the page, consider switching to landscape layout in Word (Layout > Orientation > Landscape).
Attaching package: 'MASS'
The following object is masked from 'package:gtsummary':
select
The following object is masked from 'package:dplyr':
select
Saving _problems/test-select_models-25.R
Saving _problems/test-stratified_multi_reg-32.R
Saving _problems/test-stratified_multi_reg-75.R
Saving _problems/test-stratified_multi_reg-120.R
Saving _problems/test-stratified_multi_reg-167.R
Saving _problems/test-stratified_uni_reg-21.R
Saving _problems/test-stratified_uni_reg-46.R
Saving _problems/test-stratified_uni_reg-71.R
Saving _problems/test-stratified_uni_reg-106.R
Saving _problems/test-stratified_uni_reg-142.R
Saving _problems/test-stratified_uni_reg-167.R
Saving _problems/test-uni_reg-10.R
Saving _problems/test-uni_reg-70.R
[ FAIL 27 | WARN 29 | SKIP 1 | PASS 92 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-dissect.R:1:1'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-check_collinearity.R:7:3'): check_collinearity works correctly for multivariable models ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-check_collinearity.R:7:3
2. └─dplyr::filter(PimaIndiansDiabetes2, !is.na(diabetes))
── Error ('test-check_collinearity.R:27:3'): check_collinearity throws error for univariate models ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-check_collinearity.R:27:3
2. └─dplyr::filter(PimaIndiansDiabetes2, !is.na(diabetes))
── Error ('test-check_convergence.R:4:3'): check_convergence runs correctly for valid approaches ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-check_convergence.R:4:3
── Error ('test-check_convergence.R:98:3'): check_convergence handles model fitting failure ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-check_convergence.R:98:3
── Error ('test-fit_multi_model.R:7:3'): .fit_multi_model returns correct model class for each approach ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-fit_multi_model.R:7:3
2. └─dplyr::mutate(...)
── Error ('test-fit_uni_model.R:7:3'): .fit_uni_model returns correct model class (PimaIndiansDiabetes2) ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-fit_uni_model.R:7:3
2. └─dplyr::mutate(...)
── Error ('test-fit_uni_model.R:55:3'): .fit_uni_model handles model fitting failure gracefully ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-fit_uni_model.R:55:3
── Error ('test-identify_confounder.R:6:3'): identify_confounder works across approaches using
change-in-estimate method ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-identify_confounder.R:6:3
── Error ('test-interaction_models.R:6:3'): interaction_models returns a list with expected names ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:6:3
2. └─dplyr::mutate(...)
── Error ('test-interaction_models.R:52:3'): interaction_models handles robpoisson approach ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:52:3
2. └─dplyr::mutate(...)
── Error ('test-interaction_models.R:84:3'): interaction_models errors with invalid approach ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-interaction_models.R:84:3
2. └─dplyr::mutate(...)
── Error ('test-multi_reg.R:11:3'): multi_reg computes estimates correctly across approaches ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-multi_reg.R:11:3
── Error ('test-plot_reg.R:9:3'): plot_reg works with default settings and correct X-axis labels ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-plot_reg.R:9:3
2. └─dplyr::mutate(...)
── Error ('test-plot_reg_combine.R:9:3'): plot_reg_combine works with various options ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-plot_reg_combine.R:9:3
── Error ('test-select_models.R:8:3'): select_models works for valid approaches and directions ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-select_models.R:8:3
── Error ('test-stratified_multi_reg.R:9:3'): stratified_multi_reg returns a gtsummary tbl_merge object ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:9:3
── Error ('test-stratified_multi_reg.R:61:3'): stratified_multi_reg excludes NA values in stratifier ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:61:3
── Error ('test-stratified_multi_reg.R:109:3'): stratified_multi_reg runs with robpoisson and produces estimates ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_multi_reg.R:109:3
── Error ('test-stratified_multi_reg.R:153:3'): stratified_multi_reg works with negbin ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-stratified_multi_reg.R:153:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:4:3'): stratified_uni_reg returns a gtsummary tbl_merge object with logit ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::mutate(...) at test-stratified_uni_reg.R:4:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:40:3'): stratified_uni_reg excludes NA values in stratifier ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:40:3
── Error ('test-stratified_uni_reg.R:67:3'): stratified_uni_reg errors for invalid inputs ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:67:3
── Error ('test-stratified_uni_reg.R:100:3'): stratified_uni_reg works with robpoisson ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:100:3
── Error ('test-stratified_uni_reg.R:126:3'): stratified_uni_reg works with negbin ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─dplyr::filter(...) at test-stratified_uni_reg.R:126:3
2. └─dplyr::mutate(...)
── Error ('test-stratified_uni_reg.R:163:3'): stratified_uni_reg errors when no valid strata exist ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─dplyr::mutate(...) at test-stratified_uni_reg.R:163:3
── Error ('test-uni_reg.R:6:3'): uni_reg returns a gtsummary object and works with binary data ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. ├─tidyr::drop_na(...) at test-uni_reg.R:6:3
2. └─dplyr::mutate(...)
── Error ('test-uni_reg.R:70:3'): uni_reg$ accessors return correct components ──
Error in `eval(code, test_env)`: object 'PimaIndiansDiabetes2' not found
Backtrace:
▆
1. └─tidyr::drop_na(PimaIndiansDiabetes2) at test-uni_reg.R:70:3
[ FAIL 27 | WARN 29 | SKIP 1 | PASS 92 ]
Error:
! Test failures.
Execution halted
Flavor: r-oldrel-windows-x86_64