recipe objects are created from the recipes package, which is leveraged for its set of data pre-processing tools. These recipes work by sequentially defining each pre-processing step. The implementation of each step, however, results its own class so we bundle all the axe methods related to recipe objects in general here. Note that the butchered class is only added to the recipe as a whole, and not to each pre-processing step.

# S3 method for recipe
axe_env(x, verbose = FALSE, ...)

# S3 method for step
axe_env(x, ...)

# S3 method for step_arrange
axe_env(x, ...)

# S3 method for step_impute_bag
axe_env(x, ...)

# S3 method for step_bagimpute
axe_env(x, ...)

# S3 method for step_bin2factor
axe_env(x, ...)

# S3 method for step_BoxCox
axe_env(x, ...)

# S3 method for step_bs
axe_env(x, ...)

# S3 method for step_center
axe_env(x, ...)

# S3 method for step_classdist
axe_env(x, ...)

# S3 method for step_corr
axe_env(x, ...)

# S3 method for step_count
axe_env(x, ...)

# S3 method for step_date
axe_env(x, ...)

# S3 method for step_depth
axe_env(x, ...)

# S3 method for step_discretize
axe_env(x, ...)

# S3 method for step_downsample
axe_env(x, ...)

# S3 method for step_dummy
axe_env(x, ...)

# S3 method for step_factor2string
axe_env(x, ...)

# S3 method for step_filter
axe_env(x, ...)

# S3 method for step_geodist
axe_env(x, ...)

# S3 method for step_holiday
axe_env(x, ...)

# S3 method for step_hyperbolic
axe_env(x, ...)

# S3 method for step_ica
axe_env(x, ...)

# S3 method for step_integer
axe_env(x, ...)

# S3 method for step_interact
axe_env(x, ...)

# S3 method for step_inverse
axe_env(x, ...)

# S3 method for step_invlogit
axe_env(x, ...)

# S3 method for step_isomap
axe_env(x, ...)

# S3 method for step_impute_knn
axe_env(x, ...)

# S3 method for step_knnimpute
axe_env(x, ...)

# S3 method for step_kpca
axe_env(x, ...)

# S3 method for step_lag
axe_env(x, ...)

# S3 method for step_lincomb
axe_env(x, ...)

# S3 method for step_log
axe_env(x, ...)

# S3 method for step_logit
axe_env(x, ...)

# S3 method for step_impute_lower
axe_env(x, ...)

# S3 method for step_lowerimpute
axe_env(x, ...)

# S3 method for step_impute_mean
axe_env(x, ...)

# S3 method for step_meanimpute
axe_env(x, ...)

# S3 method for step_impute_median
axe_env(x, ...)

# S3 method for step_medianimpute
axe_env(x, ...)

# S3 method for step_impute_mode
axe_env(x, ...)

# S3 method for step_modeimpute
axe_env(x, ...)

# S3 method for step_mutate
axe_env(x, ...)

# S3 method for step_naomit
axe_env(x, ...)

# S3 method for step_nnmf
axe_env(x, ...)

# S3 method for step_novel
axe_env(x, ...)

# S3 method for step_num2factor
axe_env(x, ...)

# S3 method for step_ns
axe_env(x, ...)

# S3 method for step_nzv
axe_env(x, ...)

# S3 method for step_ordinalscore
axe_env(x, ...)

# S3 method for step_other
axe_env(x, ...)

# S3 method for step_pca
axe_env(x, ...)

# S3 method for step_pls
axe_env(x, ...)

# S3 method for step_poly
axe_env(x, ...)

# S3 method for step_range
axe_env(x, ...)

# S3 method for step_ratio
axe_env(x, ...)

# S3 method for step_regex
axe_env(x, ...)

# S3 method for step_relu
axe_env(x, ...)

# S3 method for step_rm
axe_env(x, ...)

# S3 method for step_impute_roll
axe_env(x, ...)

# S3 method for step_rollimpute
axe_env(x, ...)

# S3 method for step_shuffle
axe_env(x, ...)

# S3 method for step_slice
axe_env(x, ...)

# S3 method for step_scale
axe_env(x, ...)

# S3 method for step_string2factor
axe_env(x, ...)

# S3 method for step_sqrt
axe_env(x, ...)

# S3 method for step_spatialsign
axe_env(x, ...)

# S3 method for step_unorder
axe_env(x, ...)

# S3 method for step_upsample
axe_env(x, ...)

# S3 method for step_window
axe_env(x, ...)

# S3 method for step_YeoJohnson
axe_env(x, ...)

# S3 method for step_zv
axe_env(x, ...)

# S3 method for quosure
axe_env(x, ...)

Arguments

x

A model object.

verbose

Print information each time an axe method is executed. Notes how much memory is released and what functions are disabled. Default is FALSE.

...

Any additional arguments related to axing.

Value

Axed recipe object.

Examples

suppressWarnings(suppressMessages(library(recipes))) library(modeldata) data(biomass) biomass_tr <- biomass[biomass$dataset == "Training",] rec <- recipe(HHV ~ carbon + hydrogen + oxygen + nitrogen + sulfur, data = biomass_tr) %>% step_center(all_predictors()) %>% step_scale(all_predictors()) %>% step_spatialsign(all_predictors()) out <- butcher(rec, verbose = TRUE)
#> Memory released: '45,632 B'
# Another recipe object wrapped_recipes <- function() { some_junk_in_environment <- runif(1e6) return( recipe(mpg ~ cyl, data = mtcars) %>% step_center(all_predictors()) %>% step_scale(all_predictors()) ) } # Remove junk cleaned_recipes <- axe_env(wrapped_recipes(), verbose = TRUE)
#> Memory released: '8,101,352 B'
# Check size lobstr::obj_size(cleaned_recipes)
#> 7,216 B