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") )
A recipe object. The check will be added to the sequence of operations for this recipe.
One or more selector functions to choose variables
for this 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 check to identify it.
An updated version of
recipe with the new check added to the
sequence of any existing operations.
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.
tidy() this check, a tibble with columns
selectors or variables selected) and
value (the type) is returned.