Last updated on 2026-08-03 09:50:28 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 | 8.31 | 110.60 | 118.91 | 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’ [44s/53s]
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/RtmpJmI4JB/regression_results.docx
`height` was translated to `width`.
Plot saved at: /home/hornik/tmp/scratch/RtmpJmI4JB/plot_png.png
`height` was translated to `width`.
Plot saved at: /home/hornik/tmp/scratch/RtmpJmI4JB/plot_pdf.pdf
`height` was translated to `width`.
Plot saved at: /home/hornik/tmp/scratch/RtmpJmI4JB/plot_jpg.jpg
`height` was translated to `width`.
Word document saved at: /home/hornik/tmp/scratch/RtmpJmI4JB/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/Rtmp1MIr8N’ ‘~/tmp/scratch/Rtmp1gxNmk’
‘~/tmp/scratch/Rtmp1s8TOA’ ‘~/tmp/scratch/Rtmp2W2q5l’
‘~/tmp/scratch/Rtmp2b2TPJ’ ‘~/tmp/scratch/Rtmp3GI2XT’
‘~/tmp/scratch/Rtmp467NMm’ ‘~/tmp/scratch/Rtmp4BtUIE’
‘~/tmp/scratch/Rtmp4DoNuy’ ‘~/tmp/scratch/Rtmp4THvOI’
‘~/tmp/scratch/Rtmp4ewr4j’ ‘~/tmp/scratch/Rtmp50NrzF’
‘~/tmp/scratch/Rtmp5AsYhe’ ‘~/tmp/scratch/Rtmp5Sfqy4’
‘~/tmp/scratch/Rtmp6f0vXZ’ ‘~/tmp/scratch/Rtmp6o1m1U’
‘~/tmp/scratch/Rtmp6rZeWE’ ‘~/tmp/scratch/Rtmp7Il08u’
‘~/tmp/scratch/Rtmp7TVHGJ’ ‘~/tmp/scratch/Rtmp9ePGrl’
‘~/tmp/scratch/RtmpAWMS0h’ ‘~/tmp/scratch/RtmpBLrUOo’
‘~/tmp/scratch/RtmpBqkrS1’ ‘~/tmp/scratch/RtmpCXEQIT’
‘~/tmp/scratch/RtmpCdODFM’ ‘~/tmp/scratch/RtmpD6x2tM’
‘~/tmp/scratch/RtmpDAuUci’ ‘~/tmp/scratch/RtmpDY9dZW’
‘~/tmp/scratch/RtmpDq9pKe’ ‘~/tmp/scratch/RtmpDvAawm’
‘~/tmp/scratch/RtmpFkRwaE’ ‘~/tmp/scratch/RtmpFmbA2X’
‘~/tmp/scratch/RtmpGmzzLu’ ‘~/tmp/scratch/RtmpGxpqmF’
‘~/tmp/scratch/RtmpH6voPU’ ‘~/tmp/scratch/RtmpHEyneq’
‘~/tmp/scratch/RtmpHeBNto’ ‘~/tmp/scratch/RtmpICNmMF’
‘~/tmp/scratch/RtmpIYzL9j’ ‘~/tmp/scratch/RtmpJ4jY9s’
‘~/tmp/scratch/RtmpJuWZM6’ ‘~/tmp/scratch/RtmpJywnca’
‘~/tmp/scratch/RtmpKFeZfi’ ‘~/tmp/scratch/RtmpKeFqEl’
‘~/tmp/scratch/RtmpKl0mHk’ ‘~/tmp/scratch/RtmpKthNub’
‘~/tmp/scratch/RtmpMgoJDl’ ‘~/tmp/scratch/RtmpMvPTrS’
‘~/tmp/scratch/RtmpN4SWUG’ ‘~/tmp/scratch/RtmpNaWFV4’
‘~/tmp/scratch/RtmpNkGcah’ ‘~/tmp/scratch/RtmpOnT928’
‘~/tmp/scratch/RtmpPTmsFN’ ‘~/tmp/scratch/RtmpQAN64z’
‘~/tmp/scratch/RtmpRCjkYk’ ‘~/tmp/scratch/RtmpRHf2mP’
‘~/tmp/scratch/RtmpRLu8r9’ ‘~/tmp/scratch/RtmpSICLf0’
‘~/tmp/scratch/RtmpSOAt4J’ ‘~/tmp/scratch/RtmpSavxcD’
‘~/tmp/scratch/RtmpSfWt2x’ ‘~/tmp/scratch/RtmpSiywJA’
‘~/tmp/scratch/RtmpSq2lT6’ ‘~/tmp/scratch/RtmpTRgnXd’
‘~/tmp/scratch/RtmpTkAa7P’ ‘~/tmp/scratch/RtmpTz8oZn’
‘~/tmp/scratch/RtmpU6DykQ’ ‘~/tmp/scratch/RtmpUB5Exu’
‘~/tmp/scratch/RtmpUJ0KLc’ ‘~/tmp/scratch/RtmpUNQpGs’
‘~/tmp/scratch/RtmpUV7LTp’ ‘~/tmp/scratch/RtmpVaKMbF’
‘~/tmp/scratch/RtmpWeeMQd’ ‘~/tmp/scratch/RtmpXP1Ajr’
‘~/tmp/scratch/RtmpXbUjX4’ ‘~/tmp/scratch/RtmpYPclKb’
‘~/tmp/scratch/RtmpZVhali’ ‘~/tmp/scratch/RtmpaAhDca’
‘~/tmp/scratch/RtmpbEINtB’ ‘~/tmp/scratch/RtmpbajQa2’
‘~/tmp/scratch/RtmpbhbdXG’ ‘~/tmp/scratch/Rtmpbobk5B’
‘~/tmp/scratch/RtmpbzwpMf’ ‘~/tmp/scratch/Rtmpc6RGLC’
‘~/tmp/scratch/Rtmpc7QXmr’ ‘~/tmp/scratch/Rtmpcc73gw’
‘~/tmp/scratch/RtmpcrMlwX’ ‘~/tmp/scratch/Rtmpcyw1zG’
‘~/tmp/scratch/RtmpdT8gID’ ‘~/tmp/scratch/RtmpdVleGF’
‘~/tmp/scratch/RtmpdpJvoK’ ‘~/tmp/scratch/Rtmpdtzqj2’
‘~/tmp/scratch/RtmpeSVKc8’ ‘~/tmp/scratch/Rtmpf7xkr4’
‘~/tmp/scratch/RtmpfbGKfh’ ‘~/tmp/scratch/RtmpfbkXIz’
‘~/tmp/scratch/RtmpfzbPaE’ ‘~/tmp/scratch/RtmpfzsQmJ’
‘~/tmp/scratch/Rtmph0PXup’ ‘~/tmp/scratch/Rtmpi1V7J9’
‘~/tmp/scratch/Rtmpi3qyb2’ ‘~/tmp/scratch/RtmpiVzo2y’
‘~/tmp/scratch/Rtmpin7lQc’ ‘~/tmp/scratch/RtmpinPS67’
‘~/tmp/scratch/RtmpirBWJ9’ ‘~/tmp/scratch/RtmpjQEwoQ’
‘~/tmp/scratch/RtmpjQzAmN’ ‘~/tmp/scratch/RtmpjgQkcP’
‘~/tmp/scratch/RtmpjoyGBt’ ‘~/tmp/scratch/Rtmpk0ve39’
‘~/tmp/scratch/RtmpkJXiJs’ ‘~/tmp/scratch/Rtmpkab3xV’
‘~/tmp/scratch/RtmplGADzZ’ ‘~/tmp/scratch/RtmplwSLt6’
‘~/tmp/scratch/RtmpmcLi43’ ‘~/tmp/scratch/RtmpnDYZKf’
‘~/tmp/scratch/RtmpneBB2L’ ‘~/tmp/scratch/RtmpoIBn78’
‘~/tmp/scratch/RtmpoxZAGm’ ‘~/tmp/scratch/RtmppaJFLK’
‘~/tmp/scratch/RtmppiS8op’ ‘~/tmp/scratch/RtmpptpGMX’
‘~/tmp/scratch/Rtmpq07rgW’ ‘~/tmp/scratch/Rtmpq7VoOx’
‘~/tmp/scratch/RtmpqXcNFR’ ‘~/tmp/scratch/RtmpqZd7hq’
‘~/tmp/scratch/RtmpqsKQjN’ ‘~/tmp/scratch/RtmprU1UOx’
‘~/tmp/scratch/RtmprbZh1p’ ‘~/tmp/scratch/RtmpsLoC7m’
‘~/tmp/scratch/RtmptGZ1GX’ ‘~/tmp/scratch/Rtmptl3FR5’
‘~/tmp/scratch/Rtmptvs5DB’ ‘~/tmp/scratch/RtmptxRkh9’
‘~/tmp/scratch/RtmpunxO3a’ ‘~/tmp/scratch/RtmpvBwnQa’
‘~/tmp/scratch/RtmpvzqTbw’ ‘~/tmp/scratch/RtmpwXyful’
‘~/tmp/scratch/RtmpwlK6lY’ ‘~/tmp/scratch/Rtmpwo5xuz’
‘~/tmp/scratch/RtmpxDoTux’ ‘~/tmp/scratch/RtmpxwP02o’
‘~/tmp/scratch/RtmpyGgr5C’ ‘~/tmp/scratch/RtmpyISqYp’
‘~/tmp/scratch/RtmpykxNJo’ ‘~/tmp/scratch/RtmpyyLDI1’
‘~/tmp/scratch/RtmpzHKFEr’ ‘~/tmp/scratch/xvfb-run.2kGg9e’
‘~/tmp/scratch/xvfb-run.35N2iJ’ ‘~/tmp/scratch/xvfb-run.3ylX4Q’
‘~/tmp/scratch/xvfb-run.5Lvcx6’ ‘~/tmp/scratch/xvfb-run.6kAN68’
‘~/tmp/scratch/xvfb-run.8IvaMJ’ ‘~/tmp/scratch/xvfb-run.CMV8yO’
‘~/tmp/scratch/xvfb-run.CwS6gK’ ‘~/tmp/scratch/xvfb-run.DBTIze’
‘~/tmp/scratch/xvfb-run.DFMto1’ ‘~/tmp/scratch/xvfb-run.DUgekf’
‘~/tmp/scratch/xvfb-run.GYd8od’ ‘~/tmp/scratch/xvfb-run.GlZ1pu’
‘~/tmp/scratch/xvfb-run.HIu14f’ ‘~/tmp/scratch/xvfb-run.HJfF7z’
‘~/tmp/scratch/xvfb-run.I4JYRP’ ‘~/tmp/scratch/xvfb-run.Iqly0G’
‘~/tmp/scratch/xvfb-run.JPHelX’ ‘~/tmp/scratch/xvfb-run.K2DDYO’
‘~/tmp/scratch/xvfb-run.LNVn8R’ ‘~/tmp/scratch/xvfb-run.LgOagM’
‘~/tmp/scratch/xvfb-run.LhJvZD’ ‘~/tmp/scratch/xvfb-run.MFA6g3’
‘~/tmp/scratch/xvfb-run.MRqCkE’ ‘~/tmp/scratch/xvfb-run.NYCDye’
‘~/tmp/scratch/xvfb-run.OTnoNW’ ‘~/tmp/scratch/xvfb-run.PL5xGs’
‘~/tmp/scratch/xvfb-run.QcghMz’ ‘~/tmp/scratch/xvfb-run.RTuWGY’
‘~/tmp/scratch/xvfb-run.VXnhkn’ ‘~/tmp/scratch/xvfb-run.X2da94’
‘~/tmp/scratch/xvfb-run.YU6Ctm’ ‘~/tmp/scratch/xvfb-run.Z1flRv’
‘~/tmp/scratch/xvfb-run.ZBto7N’ ‘~/tmp/scratch/xvfb-run.aLghYk’
‘~/tmp/scratch/xvfb-run.aZMRCk’ ‘~/tmp/scratch/xvfb-run.bEL5Ch’
‘~/tmp/scratch/xvfb-run.bX94xb’ ‘~/tmp/scratch/xvfb-run.cFbWga’
‘~/tmp/scratch/xvfb-run.cermPs’ ‘~/tmp/scratch/xvfb-run.cxdb0Z’
‘~/tmp/scratch/xvfb-run.eWD2CN’ ‘~/tmp/scratch/xvfb-run.g7mPdj’
‘~/tmp/scratch/xvfb-run.gthSld’ ‘~/tmp/scratch/xvfb-run.hUg7KP’
‘~/tmp/scratch/xvfb-run.iLNN0L’ ‘~/tmp/scratch/xvfb-run.lktNwD’
‘~/tmp/scratch/xvfb-run.mXPCn6’ ‘~/tmp/scratch/xvfb-run.mdOpuk’
‘~/tmp/scratch/xvfb-run.nPuNw8’ ‘~/tmp/scratch/xvfb-run.nRBVC9’
‘~/tmp/scratch/xvfb-run.olNZVB’ ‘~/tmp/scratch/xvfb-run.omVkPI’
‘~/tmp/scratch/xvfb-run.oqxa6o’ ‘~/tmp/scratch/xvfb-run.pU16Y9’
‘~/tmp/scratch/xvfb-run.qJzEhO’ ‘~/tmp/scratch/xvfb-run.sBqFgc’
‘~/tmp/scratch/xvfb-run.sMO3bT’ ‘~/tmp/scratch/xvfb-run.t1xgPw’
‘~/tmp/scratch/xvfb-run.w6G9Hq’ ‘~/tmp/scratch/xvfb-run.xFQd5v’
‘~/tmp/scratch/xvfb-run.z8qxXC’
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