tests/testthat/test-encoding_binary.R

test_that("check_name() is used", {
  dat <- iris
  dat$Species_1 <- dat$Species

  rec <- recipe(~., data = dat) |>
    step_encoding_binary(Species)

  expect_snapshot(
    error = TRUE,
    prep(rec, training = dat)
  )
})

# Infrastructure ---------------------------------------------------------------

Try the extrasteps package in your browser

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

extrasteps documentation built on Oct. 4, 2024, 1:07 a.m.