tests/testthat/test-show.R

test_that("show methods describe DETs objects", {
  response = as.factor(c("negative", "positive", "positive", "negative"))
  predictors = as.matrix(data.frame(predictor1 = c(0.2, 0.4, 0.6, 0.8)))
  detCurves = suppressMessages(detc(response, predictors, positive = "positive"))

  expect_output(show.DETs(detCurves), "Detection Error Tradeoff")
  expect_output(show(detCurves), "Detection Error Tradeoff")
  expect_output(show(detCurves), "Classifiers names")
})

Try the DET package in your browser

Any scripts or data that you put into this service are public.

DET documentation built on June 15, 2026, 9:08 a.m.