step_compare_columns: step_check_spacing

View source: R/api_recipes.R

step_compare_columnsR Documentation

step_check_spacing

Description

Check the spacing of a variable

Usage

step_compare_columns(
  .rec,
  data,
  compare,
  role = "add",
  n_sd = 4,
  na_rm = TRUE,
  ...
)

Arguments

.rec

the R6 recipe object.

data

variable unquoted data column name

compare

variable unquoted column name for comparison

role

character - the name of the role

n_sd

numeric - number of standard deviations for the scaling

na_rm

logical - should NA values be removed from calculations

...

additional arguments

Value

an updated recipe

Examples


data("kennel_2020")

kennel_2020[1e4, wl := 13.36]

frec = recipe(wl~baro, data = kennel_2020) |>
 step_compare_columns(data = wl, compare = baro, n_sd = 15) |>
 prep() |>
 bake()


jkennel/hydrorecipes documentation built on Dec. 24, 2024, 5:38 p.m.