synth_spec_extractor_api: Add, update, or remove extractors from a 'synth_spec' object

synth_spec_extractor_apiR Documentation

Add, update, or remove extractors from a synth_spec object

Description

Add, update, or remove extractors from a synth_spec object

Usage

add_custom_extractors(synth_spec, ...)

update_custom_extractors(synth_spec, ...)

remove_custom_extractors(synth_spec)

Arguments

synth_spec

A synth_spec object

...

Optional named lists with two elements, vars and extractor, mapping variable names to extractors.

Value

A new synth_spec object.

A new synth_spec object with added custom extractors.

A new synth_spec object with updated custom extractors.

A new synth_spec object with removed custom extractors.

Examples


synth_spec <- synth_spec()

add_custom_extractors(
  synth_spec = synth_spec, 
  list("vars" = c("a", "b", "c"), "extractor" = parsnip::extract_fit_engine)
)


synth_spec <- synth_spec()

update_custom_extractors(
  synth_spec = synth_spec, 
  list("vars" = c("a", "b", "c"), "extractor" = parsnip::extract_fit_engine)
)


synth_spec <- synth_spec()

synth_spec <- add_custom_extractors(
  synth_spec = synth_spec, 
  list("vars" = c("a", "b", "c"), "extractor" = parsnip::extract_fit_engine)
)

remove_custom_extractors(synth_spec = synth_spec)


tidysynthesis documentation built on March 17, 2026, 1:06 a.m.