# error checks Code rec %>% step_window(y1, size = 6) Condition Error in `step_window()`: ! `size` should be odd. --- Code rec %>% step_window(y1, size = NA) Condition Error in `step_window()`: ! `size` needs a value. --- Code rec %>% step_window(y1, statistic = "average") Condition Error in `step_window()`: ! `statistic` should be one of: 'mean', 'median', 'sd', 'var', 'sum', 'prod', 'min', 'max' --- Code rec %>% step_window(y1, size = 1) Condition Error in `step_window()`: ! `size` should be at least 3. --- Code rec %>% step_window(y1, size = 2) Condition Error in `step_window()`: ! `size` should be odd. --- Code rec %>% step_window(y1, size = -1) Condition Error in `step_window()`: ! `size` should be at least 3. --- Code rec %>% step_window(y1, size = pi) Condition Warning: `size` was not an integer (3.14159265358979) and was converted to 3. Message -- Recipe ---------------------------------------------------------------------- -- Inputs Number of variables by role predictor: 6 -- Operations * Moving 3-point mean on: y1 --- Code prep(rec %>% step_window(fac), training = sim_dat) Condition Error in `step_window()`: Caused by error in `prep()`: ! All columns selected for the step should be double, or integer. --- Code prep(rec %>% step_window(y1, size = 1000L), training = sim_dat) Condition Error in `step_window()`: ! `size` should be odd. --- Code prep(bad_names, training = sim_dat) Condition Error in `step_window()`: Caused by error in `prep()`: ! There were 2 term(s) selected but 1 values for the new features were passed to `names`. # check_name() is used Code prep(rec, training = dat) Condition Error in `step_window()`: Caused by error in `bake()`: ! Name collision occured. The following variable names already exists: i new_value # empty printing Code rec Message -- Recipe ---------------------------------------------------------------------- -- Inputs Number of variables by role outcome: 1 predictor: 10 -- Operations * Moving 3-point mean on: --- 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 * Moving 3-point mean on: | Trained # keep_original_cols - can prep recipes with it missing Code rec <- prep(rec) Condition Warning: 'keep_original_cols' was added to `step_window()` after this recipe was created. Regenerate your recipe to avoid this warning. # printing Code print(rec) Message -- Recipe ---------------------------------------------------------------------- -- Inputs Number of variables by role outcome: 1 predictor: 10 -- Operations * Moving 3-point mean on: --- 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 * Moving 3-point mean on: | Trained