tests/testthat/test_as_task_unsupervised.R

test_that("as_tasks_unsupervised dispatches correctly", {
  task = as_task_unsupervised(data.frame(x = 1:3))
  expect_identical(as_tasks_unsupervised(task), list(task))
  expect_false(identical(as_tasks_unsupervised(task, clone = TRUE)[[1]], task))
})

Try the mlr3 package in your browser

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

mlr3 documentation built on June 11, 2026, 5:08 p.m.