leeper / prediction

Tidy, Type-Safe 'prediction()' Methods
https://cran.r-project.org/package=prediction
Other
89 stars 14 forks source link

[macOS] `prediction` 0.3.17: some tests fail [ FAIL 4 | WARN 2 | SKIP 0 | PASS 188 ] #57

Open barracuda156 opened 2 months ago

barracuda156 commented 2 months ago

Please specify whether your issue is about:

R version 4.4.0 (2024-04-24) -- "Puppy Cup"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: powerpc-apple-darwin10.0.0d2 (32-bit)

> library("testthat")
> library("prediction")
> test_check("prediction")
 cyl     x
   4 26.38
   6 20.63
   8 14.88
(Intercept)    tensionM    tensionH 
   36.38889   -10.00000   -14.72222 
[ FAIL 4 | WARN 2 | SKIP 0 | PASS 188 ]

══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('tests-methods.R:40:9'): Test prediction() for 'glimQL' ──────────────
Error in `model[["call"]]`: this S4 class is not subsettable
Backtrace:
    ▆
 1. ├─prediction::prediction(m) at tests-methods.R:40:9
 2. └─prediction:::prediction.glimQL(m)
 3.   ├─prediction::find_data(model, parent.frame())
 4.   └─prediction:::find_data.default(model, parent.frame())
── Error ('tests-methods.R:130:9'): Test prediction() for 'naiveBayes' ─────────
Error in `match.arg(type)`: 'arg' should be one of "class", "raw"
Backtrace:
    ▆
 1. ├─prediction::prediction(m) at tests-methods.R:130:9
 2. └─prediction:::prediction.default(m)
 3.   ├─stats::predict(...)
 4.   └─e1071:::predict.naiveBayes(...)
 5.     └─base::match.arg(type)
── Error ('tests-methods.R:275:9'): Test prediction() for 'lda' ────────────────
Error in `data.frame(..., check.rows = FALSE, check.names = FALSE, fix.empty.names = FALSE, 
    stringsAsFactors = FALSE)`: arguments imply differing number of rows: 75, 0
Backtrace:
    ▆
 1. ├─prediction::prediction(m, data = train) at tests-methods.R:275:9
 2. └─prediction:::prediction.default(m, data = train)
 3.   └─prediction:::make_data_frame(data, fitted = tmp[["fit"]], se.fitted = tmp[["se.fit"]])
 4.     └─base::data.frame(...)
── Error ('tests-methods.R:306:9'): Test prediction() for 'qda' ────────────────
Error in `data.frame(..., check.rows = FALSE, check.names = FALSE, fix.empty.names = FALSE, 
    stringsAsFactors = FALSE)`: arguments imply differing number of rows: 75, 0
Backtrace:
    ▆
 1. ├─prediction::prediction(m, data = train) at tests-methods.R:306:9
 2. └─prediction:::prediction.default(m, data = train)
 3.   └─prediction:::make_data_frame(data, fitted = tmp[["fit"]], se.fitted = tmp[["se.fit"]])
 4.     └─base::data.frame(...)

[ FAIL 4 | WARN 2 | SKIP 0 | PASS 188 ]
Error: Test failures
Execution halted