tests/testthat/_snaps/num2factor.md

bad args

Code
  rec %>% step_num2factor(w, x, levels = c("one", "two")) %>% prep(ex_dat)
Condition
  Error in `step_num2factor()`:
  Caused by error in `prep()`:
  ! All columns selected for the step should be double, or integer.
Code
  rec %>% step_num2factor(w, x) %>% prep(ex_dat)
Condition
  Error in `step_num2factor()`:
  ! Please provide a character vector of appropriate length for `levels`.

empty printing

Code
  rec
Message

  -- Recipe ----------------------------------------------------------------------

  -- Inputs 
  Number of variables by role
  outcome:    1
  predictor: 10

  -- Operations 
  * Factor variables from: <none>
Code
  rec
Message

  -- Recipe ----------------------------------------------------------------------

  -- Inputs 
  Number of variables by role
  outcome:    1
  predictor: 10

  -- Training information 
  Training data contained 32 data points and no incomplete rows.

  -- Operations 
  * Factor variables from: <none> | Trained

printing

Code
  print(rec)
Message

  -- Recipe ----------------------------------------------------------------------

  -- Inputs 
  Number of variables by role
  predictor: 3

  -- Operations 
  * Factor variables from: z
Code
  prep(rec)
Message

  -- Recipe ----------------------------------------------------------------------

  -- Inputs 
  Number of variables by role
  predictor: 3

  -- Training information 
  Training data contained 200 data points and no incomplete rows.

  -- Operations 
  * Factor variables from: z | Trained


Try the recipes package in your browser

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

recipes documentation built on Aug. 26, 2023, 1:08 a.m.