Skip to content

step_dummy with no variable selected #348

@topepo

Description

@topepo

@kjell-stattenacity In cases where step_dummy() receives no variables, it should not just fail.

library(tidymodels)

zdat <- tibble(
  y = c(1, 2, 3), 
  x = c("a", "a", "a"),
  z = 3:1
  )

transform_recipe2 <- recipe(y ~ x, data = zdat) %>%
  step_zv(all_predictors()) %>% 
  step_dummy(all_predictors()) %>%
  prep(training = zdat)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions