R/compost.R

Defines functions compost

# This will eventually live in recipes
# https://github.com/tidymodels/recipes/issues/268

compost <- function(object) {
  if (!recipes::fully_trained(object)) {
    return(object)
  }

  object$template <- NULL
  object$retained <- FALSE

  object
}

Try the hardhat package in your browser

Any scripts or data that you put into this service are public.

hardhat documentation built on March 31, 2023, 10:21 p.m.