Condense control object into strictly smaller control object
Source:R/condense_control.R
condense_control.Rd
This function is used to help the hierarchy of control functions used throughout the tidymodels packages. It is now assumed that each control function is either a subset or a superset of another control function.
Arguments
- x
A control object to be condensed.
- ref
A control object that is used to determine what element should be kept.
Examples
ctrl <- control_parsnip(catch = TRUE)
ctrl$allow_par <- TRUE
str(ctrl)
#> List of 3
#> $ verbosity: int 1
#> $ catch : logi TRUE
#> $ allow_par: logi TRUE
#> - attr(*, "class")= chr "control_parsnip"
ctrl <- condense_control(ctrl, control_parsnip())
str(ctrl)
#> List of 2
#> $ verbosity: int 1
#> $ catch : logi TRUE
#> - attr(*, "class")= chr "control_parsnip"