check_cols creates a specification of a recipe
step that will check if all the columns of the training frame are
present in the new data.
check_cols( recipe, ..., role = NA, trained = FALSE, skip = FALSE, id = rand_id("cols") ) # S3 method for check_cols tidy(x, ...)
A recipe object. The check will be added to the sequence of operations for this recipe.
One or more selector functions to choose which
variables are checked in the check See
Not used by this check since no new variables are created.
A logical for whether the selectors in
A logical. Should the check be skipped when the
recipe is baked by
A character string that is unique to this step to identify it.
This check will break the
bake function if any of the specified
columns is not present in the data. If the check passes, nothing is changed
to the data.