Code
new_values_func(x, allowed_values[-3], colname = "MacGyver")
Condition
Error in `new_values_func()`:
! `MacGyver` contains the new value: "c".
Code
new_values_func(x, allowed_values[-c(2:3)], colname = "MacGyver")
Condition
Error in `new_values_func()`:
! `MacGyver` contains the new values: "b" and "c".
Code
new_values_func(x_na, allowed_values, ignore_NA = FALSE, colname = "MacGyver")
Condition
Error in `new_values_func()`:
! `MacGyver` contains the new value: NA.
Code
new_values_func(x_na, allowed_values[-3], ignore_NA = FALSE, colname = "MacGyver")
Condition
Error in `new_values_func()`:
! `MacGyver` contains the new values: "c" and NA.
Code
new_values_func(x_na, allowed_values[-3], ignore_NA = TRUE, colname = "MacGyver")
Condition
Error in `new_values_func()`:
! `MacGyver` contains the new value: "c".
Code
recipe(x1) %>% check_new_values(a) %>% prep() %>% bake(x2[1:4, , drop = FALSE])
Condition
Error in `new_values_func()`:
! `a` contains the new value: "d".
Code
recipe(x1) %>% check_new_values(a) %>% prep() %>% bake(x2)
Condition
Error in `new_values_func()`:
! `a` contains the new values: "d" and "e".
Code
recipe(x1) %>% check_new_values(a) %>% prep() %>% bake(x2)
Condition
Error in `new_values_func()`:
! `a` contains the new value: "d".
Code
recipe(x1) %>% check_new_values(a, ignore_NA = FALSE) %>% prep() %>% bake(x2[-4,
, drop = FALSE])
Condition
Error in `new_values_func()`:
! `a` contains the new value: NA.
Code
recipe(x1) %>% check_new_values(a, ignore_NA = FALSE) %>% prep() %>% bake(x2)
Condition
Error in `new_values_func()`:
! `a` contains the new values: "d" and NA.
Code
recipe(x1) %>% check_new_values(a) %>% prep() %>% bake(x2)
Condition
Error in `new_values_func()`:
! `a` contains the new value: "1.3".
Code
recipe(x1) %>% check_new_values(a) %>% prep() %>% bake(x2)
Condition
Error in `new_values_func()`:
! `a` contains the new value: "3".
Code
recipe(x1) %>% check_new_values(a) %>% prep() %>% bake(x2)
Condition
Error in `new_values_func()`:
! `a` contains the new value: "c".
Code
recipe(x1) %>% check_new_values(a) %>% prep() %>% bake(x2)
Condition
Error in `new_values_func()`:
! `a` contains the new value: "c".
Code
recipe(x1) %>% check_new_values(a) %>% prep() %>% bake(x2)
Condition
Error in `new_values_func()`:
! `a` contains the new value: "FALSE".
Code
bake(rec_trained, new_data = mtcars[, -3])
Condition
Error in `check_new_values()`:
! The following required column is missing from `new_data`: disp.
Code
rec
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
outcome: 1
predictor: 10
-- Operations
* Checking no new_values 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
* Checking no new_values for: <none> | Trained
Code
print(rec)
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
outcome: 1
predictor: 10
-- Operations
* Checking no new_values for: disp
Code
prep(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
* Checking no new_values for: disp | Trained
Code
recipe(mpg ~ ., mtcars) %>% check_new_values(disp, ignore_NA = 2) %>% prep()
Condition
Error in `check_new_values()`:
Caused by error in `prep()`:
! `ignore_NA` must be `TRUE` or `FALSE`, not the number 2.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.