remove_original_cols: Removes original columns if options apply

View source: R/misc.R

remove_original_colsR Documentation

Removes original columns if options apply

Description

This helper function should be used whenever the argument keep_original_cols is used in a function.

Usage

remove_original_cols(new_data, object, col_names)

Arguments

new_data

A tibble.

object

A step object.

col_names

A character vector, denoting columns to remove.

Value

new_data with col_names removed if get_keep_original_cols(object) == TRUE or object$preserve == TRUE.

See Also

developer_functions


topepo/recipes documentation built on April 10, 2024, 10:30 p.m.