* using log directory 'd:/Rcompile/CRANpkg/local/4.4/scoringutils.Rcheck' * using R version 4.4.3 (2025-02-28 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 'scoringutils/DESCRIPTION' ... OK * this is package 'scoringutils' version '2.1.2' * package encoding: UTF-8 * 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 'scoringutils' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * 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 ... [3s] OK * checking whether the package can be loaded with stated dependencies ... [2s] OK * checking whether the package can be unloaded cleanly ... [2s] OK * checking whether the namespace can be loaded with stated dependencies ... [2s] OK * checking whether the namespace can be unloaded cleanly ... [3s] OK * checking loading without being on the library search path ... [2s] OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [11s] OK * checking Rd files ... [3s] OK * checking Rd metadata ... 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 ... [2s] OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [44s] OK * checking for unstated dependencies in 'tests' ... OK * checking tests ... [63s] ERROR Running 'testthat.R' [63s] Running the tests in 'tests/testthat.R' failed. Complete output: > library(testthat) > library(scoringutils) > > test_check("scoringutils") Saving _problems/test-metrics-binary-17.R Saving _problems/test-metrics-binary-29.R Saving _problems/test-metrics-binary-33.R Saving _problems/test-metrics-binary-51.R Saving _problems/test-metrics-binary-123.R Saving _problems/test-metrics-binary-137.R Saving _problems/test-metrics-binary-156.R Saving _problems/test-metrics-binary-174.R i Some rows containing NA values may be removed. This is fine if not unexpected. [ FAIL 8 | WARN 0 | SKIP 13 | PASS 587 ] ══ Skipped tests (13) ══════════════════════════════════════════════════════════ • On CRAN (13): 'test-class-forecast.R:116:1', 'test-get-correlations.R:50:3', 'test-get-coverage.R:67:3', 'test-get-coverage.R:90:3', 'test-get-forecast-counts.R:63:3', 'test-helper-quantile-interval-range.R:97:1', 'test-helper-quantile-interval-range.R:149:1', 'test-pairwise_comparison.R:537:3', 'test-pairwise_comparison.R:545:3', 'test-plot_heatmap.R:9:3', 'test-plot_wis.R:24:3', 'test-plot_wis.R:35:3', 'test-plot_wis.R:47:3' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-metrics-binary.R:17:3'): correct input works ───────────────── Expected `assert_input_binary(observed, predicted)` not to throw any conditions. Actually got a with message: Assertion on 'observed' failed: Must have exactly 2 levels. ── Failure ('test-metrics-binary.R:29:3'): correct input works ───────────────── Expected `assert_input_binary(observed, predicted = 0.2)` not to throw any conditions. Actually got a with message: Assertion on 'observed' failed: Must have exactly 2 levels. ── Failure ('test-metrics-binary.R:33:3'): correct input works ───────────────── Expected `assert_input_binary(observed, matrix(predicted))` not to throw any conditions. Actually got a with message: Assertion on 'observed' failed: Must have exactly 2 levels. ── Error ('test-metrics-binary.R:48:3'): function throws an error for wrong input formats ── Error in `assert_input_binary(observed = observed, predicted = as.list(predicted))`: Assertion on 'observed' failed: Must have exactly 2 levels. Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-metrics-binary.R:48: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. └─scoringutils:::assert_input_binary(observed = observed, predicted = as.list(predicted)) 8. └─checkmate::assert_factor(observed, n.levels = 2, min.len = 1) 9. └─checkmate::makeAssertion(x, res, .var.name, add) 10. └─checkmate:::mstop(...) ── Error ('test-metrics-binary.R:120:3'): function throws an error when missing observed or predicted ── Error in `assert_input_binary(observed, predicted)`: Assertion on 'observed' failed: Must have exactly 2 levels. Backtrace: ▆ 1. ├─testthat::expect_error(brier_score(observed = observed), "argument \"predicted\" is missing, with no default") at test-metrics-binary.R:120: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. └─scoringutils::brier_score(observed = observed) 8. └─scoringutils:::assert_input_binary(observed, predicted) 9. └─checkmate::assert_factor(observed, n.levels = 2, min.len = 1) 10. └─checkmate::makeAssertion(x, res, .var.name, add) 11. └─checkmate:::mstop(...) ── Error ('test-metrics-binary.R:134:3'): Brier score works with different inputs ── Error in `assert_input_binary(observed, predicted)`: Assertion on 'observed' failed: Must have exactly 2 levels. Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-metrics-binary.R:134:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─scoringutils::brier_score(observed, predicted = 0.2) 5. └─scoringutils:::assert_input_binary(observed, predicted) 6. └─checkmate::assert_factor(observed, n.levels = 2, min.len = 1) 7. └─checkmate::makeAssertion(x, res, .var.name, add) 8. └─checkmate:::mstop(...) ── Error ('test-metrics-binary.R:156:3'): Binary metrics work within and outside of `score()` ── Error in `assert_forecast(data)`: ! Checking `forecast`: Input looks like a binary forecast, but found the following issue: Assertion on 'observed' failed: Must have exactly 2 levels. Backtrace: ▆ 1. ├─scoringutils::score(as_forecast_binary(df)) at test-metrics-binary.R:156:3 2. ├─scoringutils::as_forecast_binary(df) 3. └─scoringutils:::as_forecast_binary.default(df) 4. ├─scoringutils::assert_forecast(data) 5. └─scoringutils:::assert_forecast.forecast_binary(data) 6. └─cli::cli_abort(c(`!` = "Checking `forecast`: Input looks like a binary forecast, but\n found the following issue: {input_check}")) 7. └─rlang::abort(...) ── Error ('test-metrics-binary.R:171:3'): `logs_binary()` works as expected ──── Error in `assert_input_binary(observed, predicted)`: Assertion on 'observed' failed: Must have exactly 2 levels. Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-metrics-binary.R:171:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─scoringutils::logs_binary(observed, predicted) 5. └─scoringutils:::assert_input_binary(observed, predicted) 6. └─checkmate::assert_factor(observed, n.levels = 2, min.len = 1) 7. └─checkmate::makeAssertion(x, res, .var.name, add) 8. └─checkmate:::mstop(...) [ FAIL 8 | WARN 0 | SKIP 13 | PASS 587 ] Deleting unused snapshots: 'get-correlations/plot-correlation.svg', 'get-coverage/plot-interval-coverage.svg', 'get-coverage/plot-quantile-coverage.svg', 'get-forecast-counts/plot-available-forecasts.svg', 'pairwise_comparison/plot-pairwise-comparison-pval.svg', 'pairwise_comparison/plot-pairwise-comparison.svg', 'plot_heatmap/plot-heatmap.svg', 'plot_wis/plot-wis-flip.svg', 'plot_wis/plot-wis-no-relative.svg', and 'plot_wis/plot-wis.svg' Error: ! Test failures. Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [34s] OK * checking PDF version of manual ... [29s] OK * checking HTML version of manual ... [22s] OK * DONE Status: 1 ERROR