Code
prep(rec2)
Condition
Warning:
When `signed` is TRUE, `offset` will be ignored.
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
predictor: 1
-- Training information
Training data contained 4 data points and no incomplete rows.
-- Operations
* Signed log transformation on: x | Trained
Code
bake(rec_trained, new_data = ex_dat[, 1:3])
Condition
Error in `step_log()`:
! The following required column is missing from `new_data`: x4.
Code
rec
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
outcome: 1
predictor: 10
-- Operations
* Log transformation on: <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
* Log transformation on: <none> | Trained
Code
print(rec)
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
predictor: 4
-- Operations
* Log transformation on: x1, x2, x3, x4
Code
prep(rec)
Message
-- Recipe ----------------------------------------------------------------------
-- Inputs
Number of variables by role
predictor: 4
-- Training information
Training data contained 20 data points and no incomplete rows.
-- Operations
* Log transformation on: x1, x2, x3, x4 | Trained
Code
recipe(~., data = ex_dat) %>% step_log(x1, base = -1) %>% prep()
Condition
Error in `step_log()`:
Caused by error in `prep()`:
! `base` must be a number larger than or equal to 0, not the number -1.
Code
recipe(~., data = ex_dat) %>% step_log(x1, offset = "none") %>% prep()
Condition
Error in `step_log()`:
Caused by error in `prep()`:
! `offset` must be a number, not the string "none".
Code
recipe(~., data = ex_dat) %>% step_log(x1, signed = "yes") %>% prep()
Condition
Error in `step_log()`:
Caused by error in `prep()`:
! `signed` must be `TRUE` or `FALSE`, not the string "yes".
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.