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 ---------------------------------------------------------------
EmilHvitfeldt/extrasteps documentation built on Oct. 14, 2024, 10:35 p.m.