step_naomit {recipes} | R Documentation |
step_naomit
creates a specification of a recipe step that
will add remove observations (rows of data) if they contain NA
or NaN values.
step_naomit(recipe, ..., role = NA, trained = FALSE, skip = FALSE) ## S3 method for class 'step_naomit' tidy(x, ...)
recipe |
A recipe object. The step will be added to the sequence of operations for this recipe. |
... |
One or more selector functions to choose which
variables will be used to create the dummy variables. See
|
role |
Unused, include for consistency with other steps. |
trained |
A logical to indicate if the quantities for preprocessing have been estimated. Again included for consistency. |
skip |
A logical. Should the step be skipped when the
recipe is baked by |
x |
A |
An updated version of recipe
with the
new step added to the sequence of existing steps (if any).
recipe()
prep.recipe()
bake.recipe()
recipe(Ozone ~ ., data = airquality) %>% step_naomit(Solar.R) %>% prep(airquality, verbose = FALSE, retain = TRUE) %>% juice()