Code
rec %>% step_relevel(sqft, ref_level = 23) %>% prep()
Condition
Error in `step_relevel()`:
Caused by error in `prep()`:
x All columns selected for the step should be string, factor, or ordered.
* 1 integer variable found: `sqft`
Code
rec %>% step_relevel(city, ref_level = "missing_level") %>% prep()
Condition
Error in `step_relevel()`:
Caused by error in `prep()`:
! The following column doesn't include required reference level "missing_level": `city`.
Code
rec
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
outcome: 1
predictor: 10
-- Operations
* Re-order factor level to ref_level for: <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
* Re-order factor level to ref_level for: <none> | Trained
Code
print(rec)
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
predictor: 9
-- Operations
* Re-order factor level to ref_level for: zip
Code
prep(rec)
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
predictor: 9
-- Training information
Training data contained 800 data points and no incomplete rows.
-- Operations
* Re-order factor level to ref_level for: zip | Trained
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.