File: compost.R

package info (click to toggle)
r-cran-hardhat 1.2.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,656 kB
  • sloc: sh: 13; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 251 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
# 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
}