* using log directory 'd:/RCompile/CRANincoming/R-devel/SLOS.Rcheck' * using R Under development (unstable) (2024-12-12 r87438 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 13.3.0 GNU Fortran (GCC) 13.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'SLOS/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'SLOS' version '1.0.0' * package encoding: UTF-8 * checking CRAN incoming feasibility ... NOTE Maintainer: 'Igor Peres ' New submission Possibly misspelled words in DESCRIPTION: Peres (7:158, 7:332, 7:535) SLOSR (7:588) SRU (7:645) al (7:167, 7:341, 7:544) et (7:164, 7:338, 7:541) multicentre (7:414) No Authors@R field in DESCRIPTION. Please add one, modifying Authors@R: person(given = "Igor", family = "Peres", role = c("aut", "cre"), email = "igor.peres@puc-rio.br") as necessary. The Description field should not start with the package name, 'This package' or similar. The Description field contains information:https://github.com/igor-peres/ICU-Length-of-Stay-Prediction Please enclose URLs in angle brackets (<...>). * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'SLOS' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking for future file timestamps ... OK * checking DESCRIPTION meta-information ... NOTE Malformed Description field: should contain one or more complete sentences. License components which are templates and need '+ file LICENSE': MIT License * checking top-level files ... NOTE Non-standard file/directory found at top level: 'cran-comments.md' * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... WARNING 'library' or 'require' calls not declared from: 'MLmetrics' 'caretEnsemble' 'dplyr' 'ems' 'ggplot2' 'grid' 'httr' 'png' 'ranger' 'library' or 'require' calls in package code: 'MLmetrics' 'caretEnsemble' 'dplyr' 'ems' 'ggplot2' 'grid' 'httr' 'png' 'ranger' Please use :: or requireNamespace() instead. See section 'Suggested packages' in the 'Writing R Extensions' manual. * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... NOTE SLOS: no visible global function definition for '%>%' SLOS: no visible global function definition for 'mutate' SLOS: no visible global function definition for 'case_when' SLOS: no visible global function definition for 'bind_cols' SLOS: no visible global function definition for 'select' SLOS: no visible binding for global variable 'UnitCode' SLOS: no visible global function definition for 'group_by' SLOS: no visible global function definition for 'summarise' SLOS: no visible global function definition for 'n' SLOS: no visible global function definition for 'ungroup' SLOS: no visible binding for global variable 'soma_los_obs' SLOS: no visible binding for global variable 'soma_los_esp' SLOS: no visible global function definition for 'na.omit' SLOS: no visible global function definition for 'ggplot' SLOS: no visible global function definition for 'geom_point' SLOS: no visible global function definition for 'aes' SLOS: no visible global function definition for 'geom_smooth' SLOS: no visible global function definition for 'geom_abline' SLOS: no visible global function definition for 'labs' SLOS: no visible global function definition for 'theme_bw' SLOS: no visible global function definition for 'funnel' SLOS: no visible global function definition for 'png' SLOS: no visible global function definition for 'dev.off' SLOS: no visible global function definition for 'rasterGrob' SLOS: no visible global function definition for 'readPNG' SLOS: no visible global function definition for 'annotation_custom' SLOS: no visible global function definition for 'theme_void' load_SLOSModel: no visible global function definition for 'GET' load_SLOSModel: no visible global function definition for 'write_disk' load_SLOSModel: no visible global function definition for 'timeout' load_SLOSModel: no visible global function definition for 'status_code' load_sampled_data: no visible global function definition for 'data' predict_and_evaluate: no visible global function definition for 'predict' predict_and_evaluate: no visible binding for global variable 'small_model' predict_and_evaluate: no visible global function definition for 'RMSE' predict_and_evaluate: no visible global function definition for 'MAE' predict_and_evaluate: no visible global function definition for 'R2_Score' Undefined global functions or variables: %>% GET MAE R2_Score RMSE UnitCode aes annotation_custom bind_cols case_when data dev.off funnel geom_abline geom_point geom_smooth ggplot group_by labs mutate n na.omit png predict rasterGrob readPNG select small_model soma_los_esp soma_los_obs status_code summarise theme_bw theme_void timeout ungroup write_disk Consider adding importFrom("grDevices", "dev.off", "png") importFrom("stats", "na.omit", "predict") importFrom("utils", "data") to your NAMESPACE file. Found the following assignments to the global environment: File 'SLOS/R/02-Evaluation.R': assign("df_unit_slos", df_unit_slos, envir = .GlobalEnv) Found the following calls to data() loading into the global environment: File 'SLOS/R/01-Prediction.R': data("SampledData") See section 'Good practice' in '?data'. * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking data for ASCII and uncompressed saves ... OK * checking examples ... NONE * checking for unstated dependencies in 'tests' ... OK * checking tests ... ERROR Running 'testthat.R' Running the tests in 'tests/testthat.R' failed. Complete output: > library(testthat) > library(SLOS) > > test_check("SLOS") [ FAIL 2 | WARN 0 | SKIP 0 | PASS 2 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-Evaluation.R:5:3'): SLOS generates expected outputs ──────────── Error in `predict_and_evaluate(data)`: object 'small_model' not found Backtrace: ▆ 1. ├─base::suppressWarnings(SLOS::SLOS(mock_data)) at test-Evaluation.R:5:3 2. │ └─base::withCallingHandlers(...) 3. └─SLOS::SLOS(mock_data) 4. └─SLOS::predict_and_evaluate(data) 5. └─stats::predict(small_model, newdata = data) ── Error ('test-Prediction.R:3:3'): predict_and_evaluate works as expected ───── Error in `predict_and_evaluate(sampled_data)`: object 'small_model' not found Backtrace: ▆ 1. └─SLOS::predict_and_evaluate(sampled_data) at test-Prediction.R:3:3 2. └─stats::predict(small_model, newdata = data) [ FAIL 2 | WARN 0 | SKIP 0 | PASS 2 ] Error: Test failures Execution halted * checking PDF version of manual ... [13s] OK * checking HTML version of manual ... OK * DONE Status: 1 ERROR, 1 WARNING, 4 NOTEs