R Under development (unstable) (2025-10-19 r88945 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(ONAM) Loading required package: keras The keras package is deprecated. Use the keras3 package instead. Attaching package: 'ONAM' The following object is masked from 'package:stats': decompose > > test_check("ONAM") To use legacy Keras via py_require(), call py_require_legacy_keras() at the start of the R session. Hint: To use tensorflow with `py_require()`, call `py_require("tensorflow")` at the start of the R session [ FAIL 1 | WARN 0 | SKIP 0 | PASS 3 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-onam.R:60:3'): Input checks work ─────────────────────────────── Error: Valid installation of TensorFlow not found. Python environments searched for 'tensorflow' package: C:\Users\CRAN\Documents\.virtualenvs\r-reticulate\Scripts\python.exe Python exception encountered: Traceback (most recent call last): File "D:\RCompile\CRANpkg\lib\4.6\reticulate\python\rpytools\loader.py", line 122, in _find_and_load_hook return _run_hook(name, _hook) ^^^^^^^^^^^^^^^^^^^^^^ File "D:\RCompile\CRANpkg\lib\4.6\reticulate\python\rpytools\loader.py", line 96, in _run_hook module = hook() ^^^^^^ File "D:\RCompile\CRANpkg\lib\4.6\reticulate\python\rpytools\loader.py", line 120, in _hook return _find_and_load(name, import_) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'tensorflow' You can install TensorFlow using the install_tensorflow() function. Backtrace: ▆ 1. ├─testthat::expect_warning(...) at test-onam.R:60:3 2. │ └─testthat:::expect_condition_matching(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. ├─ONAM::onam(...) 8. │ └─ONAM:::create_model(...) 9. │ └─ONAM:::create_inputs(model_info, categorical_features, cat_counts) 10. │ └─base::lapply(...) 11. │ └─ONAM (local) FUN(X[[i]], ...) 12. │ └─base::lapply(...) 13. │ └─ONAM (local) FUN(X[[i]], ...) 14. │ └─keras::layer_input(shape = n_inputs) 15. │ ├─base::do.call(keras$layers$Input, args) 16. │ ├─keras$layers 17. │ └─reticulate:::`$.python.builtin.module`(keras, "layers") 18. │ └─reticulate::py_get_attr(x, name, TRUE) 19. └─reticulate (local) ``(``) 20. └─keras (local) on_error(result) [ FAIL 1 | WARN 0 | SKIP 0 | PASS 3 ] Error: Test failures Execution halted