R Under development (unstable) (2025-01-25 r87633 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(preventr) > > test_check("preventr") Please note: This function was written primarily for internal package use or as part of estimating risk with `estimate_risk()` or `est_risk()`. Fitness for more general use has not been tested exhaustively. For example, this function implements basic checks of input, but some of the input handling is delegated to other processes that are invoked when using these functions as aforementioned. To give a more concrete example, this function will not reject extreme values for creatinine. That said, the calculations have certainly been tested for accuracy, so if you are confident you understand this caution and in the fidelity of the input you passed to this function, you can proceed judiciously. Please note: This function was written primarily for internal package use or as part of estimating risk with `estimate_risk()` or `est_risk()`. Fitness for more general use has not been tested exhaustively. For example, this function implements basic checks of input, but some of the input handling is delegated to other processes that are invoked when using these functions as aforementioned. To give a more concrete example, this function will not reject extreme values for creatinine. That said, the calculations have certainly been tested for accuracy, so if you are confident you understand this caution and in the fidelity of the input you passed to this function, you can proceed judiciously. PREVENT estimates are from: Base model. PREVENT estimates are from: Base model. PREVENT estimates are from: Base model. PREVENT estimates are from: Base model. PREVENT estimates are from: Base model. Please note: This function was written primarily for internal package use or as part of estimating risk with `estimate_risk()` or `est_risk()`. Fitness for more general use has not been tested exhaustively. For example, this function implements basic checks of input, but some of the input handling is delegated to other processes that are invoked when using these functions as aforementioned. To give a more concrete example, this function will not reject extreme values for height and weight. That said, the calculations have certainly been tested for accuracy, so if you are confident you understand this caution and in the fidelity of the input you passed to this function, you can proceed judiciously. Please note: This function was written primarily for internal package use or as part of estimating risk with `estimate_risk()` or `est_risk()`. Fitness for more general use has not been tested exhaustively. For example, this function implements basic checks of input, but some of the input handling is delegated to other processes that are invoked when using these functions as aforementioned. To give a more concrete example, this function will not reject extreme values for height and weight. That said, the calculations have certainly been tested for accuracy, so if you are confident you understand this caution and in the fidelity of the input you passed to this function, you can proceed judiciously. PREVENT estimates are from: Base model. PREVENT estimates are from: Base model. PREVENT estimates are from: Base model. PREVENT estimates are from: Base model. PREVENT estimates are from: Base model. Please note: This function was written primarily for internal package use or as part of estimating risk with `estimate_risk()` or `est_risk()`. Fitness for more general use has not been tested exhaustively. For example, this function implements basic checks of input, but some of the input handling is delegated to other processes that are invoked when using these functions as aforementioned. To give a more concrete example, although this function checks input validity it just returns `NA` with no messaging if it finds a problem. That said, the calculations have certainly been tested for accuracy, so if you are confident you understand this caution and in the fidelity of the input you passed to this function, you can proceed judiciously. Please note: This function was written primarily for internal package use or as part of estimating risk with `estimate_risk()` or `est_risk()`. Fitness for more general use has not been tested exhaustively. For example, this function implements basic checks of input, but some of the input handling is delegated to other processes that are invoked when using these functions as aforementioned. To give a more concrete example, although this function checks input validity it just returns `NA` with no messaging if it finds a problem. That said, the calculations have certainly been tested for accuracy, so if you are confident you understand this caution and in the fidelity of the input you passed to this function, you can proceed judiciously. PREVENT estimates are from: Base model. PREVENT estimates are from: Base model. PREVENT estimates are from: Base model. PREVENT estimates are from: Base model. Please check the following required variables: Please check the following required variables: * `age` entered as the invalid column name `trips_around_the_sun` in conjunction with `use_dat = TRUE`; as such, no values were passed for `age`, but must be between 30 and 79 for the PREVENT models Please check the following required variables: * `age` entered as the invalid column name `trips_around_the_sun` in conjunction with `use_dat = TRUE`; as such, no values were passed for `age`, but must be between 30 and 79 for the PREVENT models Please check the following required variables: * `age` entered as the invalid column name `trips_around_the_sun` in conjunction with `use_dat = TRUE`; as such, no values were passed for `age`, but must be between 30 and 79 for the PREVENT models Please check the following required variables: * `age` entered as the invalid column name `trips_around_the_sun` in conjunction with `use_dat = TRUE`; as such, no values were passed for `age`, but must be between 30 and 79 for the PREVENT models Please check the following required variables: Please check the following required variables: * `sex` entered as the invalid column name `foo` in conjunction with `use_dat = TRUE`; as such, no values were passed for `sex`, but must be one of "female", "f", "male", "m" Please check the following required variables: * `sex` entered as the invalid column name `foo` in conjunction with `use_dat = TRUE`; as such, no values were passed for `sex`, but must be one of "female", "f", "male", "m" Please check the following required variables: * `sex` entered as the invalid column name `foo` in conjunction with `use_dat = TRUE`; as such, no values were passed for `sex`, but must be one of "female", "f", "male", "m" Please check the following required variables: * `sex` entered as the invalid column name `foo` in conjunction with `use_dat = TRUE`; as such, no values were passed for `sex`, but must be one of "female", "f", "male", "m" Please check the following required variables: Please check the following required variables: * `sbp` entered as the invalid column name `blood_pressure` in conjunction with `use_dat = TRUE`; as such, no values were passed for `sbp`, but must be between 90 and 180 Please check the following required variables: * `sbp` entered as the invalid column name `blood_pressure` in conjunction with `use_dat = TRUE`; as such, no values were passed for `sbp`, but must be between 90 and 180 Please check the following required variables: * `sbp` entered as the invalid column name `blood_pressure` in conjunction with `use_dat = TRUE`; as such, no values were passed for `sbp`, but must be between 90 and 180 Please check the following required variables: * `sbp` entered as the invalid column name `blood_pressure` in conjunction with `use_dat = TRUE`; as such, no values were passed for `sbp`, but must be between 90 and 180 Please check the following required variables: Please check the following required variables: * `bp_tx` entered as the invalid column name `blood_pressure_treatment` in conjunction with `use_dat = TRUE`; as such, no values were passed for `bp_tx`, but must be one of TRUE, 1, FALSE, 0 Please check the following required variables: * `bp_tx` entered as the invalid column name `blood_pressure_treatment` in conjunction with `use_dat = TRUE`; as such, no values were passed for `bp_tx`, but must be one of TRUE, 1, FALSE, 0 Please check the following required variables: * `bp_tx` entered as the invalid column name `blood_pressure_treatment` in conjunction with `use_dat = TRUE`; as such, no values were passed for `bp_tx`, but must be one of TRUE, 1, FALSE, 0 Please check the following required variables: * `bp_tx` entered as the invalid column name `blood_pressure_treatment` in conjunction with `use_dat = TRUE`; as such, no values were passed for `bp_tx`, but must be one of TRUE, 1, FALSE, 0 Please check the following required variables: Please check the following required variables: * `total_c` entered as the invalid column name `total_cholesterol` in conjunction with `use_dat = TRUE`; as such, no values were passed for `total_c`, but must be between 130 and 320 Please check the following required variables: * `total_c` entered as the invalid column name `total_cholesterol` in conjunction with `use_dat = TRUE`; as such, no values were passed for `total_c`, but must be between 130 and 320 Please check the following required variables: * `total_c` entered as the invalid column name `total_cholesterol` in conjunction with `use_dat = TRUE`; as such, no values were passed for `total_c`, but must be between 130 and 320 Please check the following required variables: * `total_c` entered as the invalid column name `total_cholesterol` in conjunction with `use_dat = TRUE`; as such, no values were passed for `total_c`, but must be between 130 and 320 Please check the following required variables: Please check the following required variables: * `hdl_c` entered as the invalid column name `hdl_cholesterol` in conjunction with `use_dat = TRUE`; as such, no values were passed for `hdl_c`, but must be between 20 and 100 Please check the following required variables: * `hdl_c` entered as the invalid column name `hdl_cholesterol` in conjunction with `use_dat = TRUE`; as such, no values were passed for `hdl_c`, but must be between 20 and 100 Please check the following required variables: * `hdl_c` entered as the invalid column name `hdl_cholesterol` in conjunction with `use_dat = TRUE`; as such, no values were passed for `hdl_c`, but must be between 20 and 100 Please check the following required variables: * `hdl_c` entered as the invalid column name `hdl_cholesterol` in conjunction with `use_dat = TRUE`; as such, no values were passed for `hdl_c`, but must be between 20 and 100 Please check the following required variables: Please check the following required variables: * `statin` entered as the invalid column name `statin_use` in conjunction with `use_dat = TRUE`; as such, no values were passed for `statin`, but must be one of TRUE, 1, FALSE, 0 Please check the following required variables: * `statin` entered as the invalid column name `statin_use` in conjunction with `use_dat = TRUE`; as such, no values were passed for `statin`, but must be one of TRUE, 1, FALSE, 0 Please check the following required variables: * `statin` entered as the invalid column name `statin_use` in conjunction with `use_dat = TRUE`; as such, no values were passed for `statin`, but must be one of TRUE, 1, FALSE, 0 Please check the following required variables: * `statin` entered as the invalid column name `statin_use` in conjunction with `use_dat = TRUE`; as such, no values were passed for `statin`, but must be one of TRUE, 1, FALSE, 0 Please check the following required variables: Please check the following required variables: * `dm` entered as the invalid column name `diabetes` in conjunction with `use_dat = TRUE`; as such, no values were passed for `dm`, but must be one of TRUE, 1, FALSE, 0 Please check the following required variables: * `dm` entered as the invalid column name `diabetes` in conjunction with `use_dat = TRUE`; as such, no values were passed for `dm`, but must be one of TRUE, 1, FALSE, 0 Please check the following required variables: * `dm` entered as the invalid column name `diabetes` in conjunction with `use_dat = TRUE`; as such, no values were passed for `dm`, but must be one of TRUE, 1, FALSE, 0 Please check the following required variables: * `dm` entered as the invalid column name `diabetes` in conjunction with `use_dat = TRUE`; as such, no values were passed for `dm`, but must be one of TRUE, 1, FALSE, 0 Please check the following required variables: Please check the following required variables: * `smoking` entered as the invalid column name `smoking_status` in conjunction with `use_dat = TRUE`; as such, no values were passed for `smoking`, but must be one of TRUE, 1, FALSE, 0 Please check the following required variables: * `smoking` entered as the invalid column name `smoking_status` in conjunction with `use_dat = TRUE`; as such, no values were passed for `smoking`, but must be one of TRUE, 1, FALSE, 0 Please check the following required variables: * `smoking` entered as the invalid column name `smoking_status` in conjunction with `use_dat = TRUE`; as such, no values were passed for `smoking`, but must be one of TRUE, 1, FALSE, 0 Please check the following required variables: * `smoking` entered as the invalid column name `smoking_status` in conjunction with `use_dat = TRUE`; as such, no values were passed for `smoking`, but must be one of TRUE, 1, FALSE, 0 Please check the following required variables: Please check the following required variables: * `egfr` entered as the invalid column name `estimated_glomerular_filtration_rate` in conjunction with `use_dat = TRUE`; as such, no values were passed for `egfr`, but must be between 15 and 140 Please check the following required variables: * `egfr` entered as the invalid column name `estimated_glomerular_filtration_rate` in conjunction with `use_dat = TRUE`; as such, no values were passed for `egfr`, but must be between 15 and 140 Please check the following required variables: * `egfr` entered as the invalid column name `estimated_glomerular_filtration_rate` in conjunction with `use_dat = TRUE`; as such, no values were passed for `egfr`, but must be between 15 and 140 Please check the following required variables: * `egfr` entered as the invalid column name `estimated_glomerular_filtration_rate` in conjunction with `use_dat = TRUE`; as such, no values were passed for `egfr`, but must be between 15 and 140 Please check the following required variables: Please check the following required variables: * `bmi` entered as the invalid column name `body_mass_index` in conjunction with `use_dat = TRUE`; as such, no values were passed for `bmi`, but must be between 18.5 and 39.9 Please check the following required variables: * `bmi` entered as the invalid column name `body_mass_index` in conjunction with `use_dat = TRUE`; as such, no values were passed for `bmi`, but must be between 18.5 and 39.9 Please check the following required variables: * `bmi` entered as the invalid column name `body_mass_index` in conjunction with `use_dat = TRUE`; as such, no values were passed for `bmi`, but must be between 18.5 and 39.9 Please check the following required variables: * `bmi` entered as the invalid column name `body_mass_index` in conjunction with `use_dat = TRUE`; as such, no values were passed for `bmi`, but must be between 18.5 and 39.9 Please check the following optional variables: Please check the following optional variables: * `hba1c` entered as the invalid column name `sugar` in conjunction with `use_dat = TRUE`; as such, no values were passed for `hba1c`, but must be between 4.5 and 15 Please check the following optional variables: * `hba1c` entered as the invalid column name `sugar` in conjunction with `use_dat = TRUE`; as such, no values were passed for `hba1c`, but must be between 4.5 and 15 Please check the following optional variables: * `hba1c` entered as the invalid column name `sugar` in conjunction with `use_dat = TRUE`; as such, no values were passed for `hba1c`, but must be between 4.5 and 15 Please check the following optional variables: * `hba1c` entered as the invalid column name `sugar` in conjunction with `use_dat = TRUE`; as such, no values were passed for `hba1c`, but must be between 4.5 and 15 Please check the following optional variables: Please check the following optional variables: * `uacr` entered as the invalid column name `protein` in conjunction with `use_dat = TRUE`; as such, no values were passed for `uacr`, but must be between 0.1 and 25000 Please check the following optional variables: * `uacr` entered as the invalid column name `protein` in conjunction with `use_dat = TRUE`; as such, no values were passed for `uacr`, but must be between 0.1 and 25000 Please check the following optional variables: * `uacr` entered as the invalid column name `protein` in conjunction with `use_dat = TRUE`; as such, no values were passed for `uacr`, but must be between 0.1 and 25000 Please check the following optional variables: * `uacr` entered as the invalid column name `protein` in conjunction with `use_dat = TRUE`; as such, no values were passed for `uacr`, but must be between 0.1 and 25000 Please check the following optional variables: Please check the following optional variables: * `zip` entered as the invalid column name `where_are_you` in conjunction with `use_dat = TRUE`; as such, no values were passed for `zip` Please check the following optional variables: * `zip` entered as the invalid column name `where_are_you` in conjunction with `use_dat = TRUE`; as such, no values were passed for `zip` Please check the following optional variables: * `zip` entered as the invalid column name `where_are_you` in conjunction with `use_dat = TRUE`; as such, no values were passed for `zip` Please check the following optional variables: * `zip` entered as the invalid column name `where_are_you` in conjunction with `use_dat = TRUE`; as such, no values were passed for `zip` | | | 0% | |======= | 10% | |============== | 20% | |===================== | 30% | |============================ | 40% | |=================================== | 50% | |========================================== | 60% | |================================================= | 70% | |======================================================== | 80% | |=============================================================== | 90% | |======================================================================| 100% PREVENT estimates are from: Base model adding HbA1c, SDI, and UACR (also referred to as the full model). PREVENT estimates are from: Base model adding UACR. PREVENT estimates are from: Base model adding HbA1c. Please check the following optional variables: Please check the following optional variables: Please check the following optional variables: PREVENT estimates are from: Base model. Please check the following optional variables: * `hba1c` entered as 8675309, but must be between 4.5 and 15 (so set to NULL) Please check the following optional variables: PREVENT estimates are from: Base model adding SDI. Please check the following optional variables: * `hba1c` entered as 8675309, but must be between 4.5 and 15 (so set to NULL) Please check the following optional variables: PREVENT estimates are from: Base model adding SDI. Please check the following optional variables: * `hba1c` entered as 8675309, but must be between 4.5 and 15 (so set to NULL) PREVENT estimates are from: Base model adding HbA1c. PREVENT estimates are from: Base model adding HbA1c. PREVENT estimates are from: Base model adding HbA1c. PREVENT estimates are from: Base model adding HbA1c. PREVENT estimates are from: Base model adding HbA1c. PREVENT estimates are from: Base model adding HbA1c. PREVENT estimates are from: Base model adding HbA1c. PREVENT estimates are from: Base model adding HbA1c. PREVENT estimates are from: Base model adding HbA1c. PREVENT estimates are from: Base model adding HbA1c. PREVENT estimates are from: Base model adding UACR. PREVENT estimates are from: Base model. PREVENT estimates are from: Base model adding SDI. PREVENT estimates are from: Base model. PREVENT estimates are from: Base model. PREVENT estimates are from: Base model adding HbA1c. PREVENT estimates are from: Base model adding SDI. PREVENT estimates are from: Base model adding HbA1c, SDI, and UACR (also referred to as the full model). PREVENT estimates are from: Base model adding HbA1c. PREVENT estimates are from: Base model. [ FAIL 0 | WARN 2 | SKIP 59 | PASS 794 ] ══ Skipped tests (59) ══════════════════════════════════════════════════════════ • On CRAN (59): 'test-helpers_test.R:188:3', 'test-helpers_test.R:226:3', 'test-other_models.R:1023:3', 'test-prevent_equations.R:293:3', 'test-prevent_equations.R:297:3', 'test-prevent_equations.R:334:3', 'test-prevent_equations.R:367:3', 'test-prevent_equations.R:371:3', 'test-prevent_equations.R:377:3', 'test-prevent_equations.R:381:3', 'test-prevent_equations.R:385:3', 'test-prevent_equations.R:393:3', 'test-prevent_equations.R:397:3', 'test-prevent_equations.R:405:3', 'test-prevent_equations.R:411:3', 'test-prevent_equations.R:415:3', 'test-prevent_equations.R:421:3', 'test-prevent_equations.R:425:3', 'test-prevent_equations.R:431:3', 'test-prevent_equations.R:435:3', 'test-prevent_equations.R:439:3', 'test-prevent_equations.R:443:3', 'test-prevent_equations.R:447:3', 'test-prevent_equations.R:451:3', 'test-prevent_equations.R:464:3', 'test-prevent_equations.R:468:3', 'test-prevent_equations.R:472:3', 'test-prevent_equations.R:476:3', 'test-prevent_equations.R:480:3', 'test-prevent_equations.R:484:3', 'test-prevent_equations.R:488:3', 'test-prevent_equations.R:492:3', 'test-prevent_equations.R:529:3', 'test-prevent_equations.R:590:3', 'test-prevent_equations.R:594:3', 'test-prevent_equations.R:599:3', 'test-prevent_equations.R:608:3', 'test-prevent_equations.R:617:3', 'test-prevent_equations.R:626:3', 'test-prevent_equations.R:636:3', 'test-prevent_equations.R:646:3', 'test-prevent_equations.R:657:3', 'test-prevent_equations.R:676:3', 'test-prevent_equations.R:696:3', 'test-prevent_equations.R:735:3', 'test-prevent_equations.R:746:3', 'test-prevent_equations.R:942:3', 'test-prevent_equations.R:961:3', 'test-prevent_equations.R:981:3', 'test-prevent_equations.R:1020:3', 'test-prevent_equations.R:1031:3', 'test-prevent_equations.R:1297:3', 'test-prevent_equations.R:1486:3', 'test-prevent_equations.R:1584:3', 'test-prevent_equations.R:1604:3', 'test-prevent_equations.R:1624:3', 'test-prevent_equations.R:1802:3', 'test-prevent_equations.R:1842:3', 'test-prevent_equations.R:3345:3' [ FAIL 0 | WARN 2 | SKIP 59 | PASS 794 ] > > proc.time() user system elapsed 93.82 3.93 97.98