synth_spec_noise_api: Add, update, or remove noise from a 'synth_spec' object

synth_spec_noise_apiR Documentation

Add, update, or remove noise from a synth_spec object

Description

Add, update, or remove noise from a synth_spec object

Usage

add_custom_noise(synth_spec, ...)

Arguments

synth_spec

A synth_spec object

...

Optional named lists with two elements, vars and noise, mapping variable names to samplers.

Value

A new synth_spec object.

A new synth_spec object with added custom noise.

Examples


synth_spec <- synth_spec()

noise1 <- noise(
  add_noise = TRUE, 
  noise_func = add_noise_kde,
  noise_params = list(
    n_ntiles = 2
  )
)

add_custom_noise(
  synth_spec = synth_spec, 
  list("vars" = c("a", "b", "c"), "noise" = noise1)
)


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