Learn R Programming

butcher (version 0.4.0)

axe-rsample-indicators: Axe indicators within rsample objects.

Description

Replace the splitting and resampling objects with a placeholder.

Usage

axe_rsample_indicators(x, verbose = FALSE, ...)

# S3 method for default axe_rsample_indicators(x, verbose = FALSE, ...)

# S3 method for rsplit axe_rsample_indicators(x, verbose = FALSE, ...)

# S3 method for three_way_split axe_rsample_indicators(x, verbose = FALSE, ...)

# S3 method for rset axe_rsample_indicators(x, verbose = FALSE, ...)

# S3 method for tune_results axe_rsample_indicators(x, verbose = FALSE, ...)

# S3 method for workflow_set axe_rsample_indicators(x, verbose = FALSE, ...)

Value

An updated object without the indicators in the rsplit objects.

Arguments

x

An 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.

Methods

See the following help topics for more details about individual methods:

butcher

  • axe-rsample-indicators: default, rset, rsplit, three_way_split, tune_results, workflow_set

Details

Resampling and splitting objects produced by rsample contain rsplit objects. These contain the original data set as well as indicators that specify which rows go into which data partitions. These size of these integers might be large so we sometimes wish to remove them when saving objects. This method saves a zero-row integer in their place.

Examples

Run this code

large_cars <- mtcars[rep(1:32, 50), ]
large_cars_split <- rsample::initial_split(large_cars)
butcher(large_cars_split, verbose = TRUE)

Run the code above in your browser using DataLab