| synth_spec_sampler_api | R Documentation |
synth_spec objectAdd, update, or remove samplers from a synth_spec object
add_custom_samplers(synth_spec, ...)
update_custom_samplers(synth_spec, ...)
remove_custom_samplers(synth_spec)
update_custom_noise(synth_spec, ...)
remove_custom_noise(synth_spec)
synth_spec |
A |
... |
Optional named lists with two elements, |
A new synth_spec object.
A new synth_spec object with added custom samplers.
A new synth_spec object with updated custom samplers.
A new synth_spec object with removed custom samplers.
A new synth_spec object with updated custom noise.
A new synth_spec object with removed custom noise.
synth_spec <- synth_spec()
add_custom_samplers(
synth_spec = synth_spec,
list("vars" = c("a", "b", "c"), "sampler" = sample_rpart)
)
synth_spec <- synth_spec()
update_custom_samplers(
synth_spec = synth_spec,
list("vars" = c("a", "b", "c"), "sampler" = sample_rpart)
)
synth_spec <- synth_spec()
synth_spec <- add_custom_samplers(
synth_spec = synth_spec,
list("vars" = c("a", "b", "c"), "sampler" = sample_rpart)
)
remove_custom_samplers(synth_spec = synth_spec)
synth_spec <- synth_spec()
noise1 <- noise(
add_noise = TRUE,
noise_func = add_noise_kde,
noise_params = list(
n_ntiles = 2
)
)
update_custom_noise(
synth_spec = synth_spec,
list("vars" = c("a", "b", "c"), "noise" = noise1)
)
synth_spec <- synth_spec()
noise1 <- noise(
add_noise = TRUE,
noise_func = add_noise_kde,
noise_params = list(
n_ntiles = 2
)
)
synth_spec <- add_custom_noise(
synth_spec = synth_spec,
list("vars" = c("a", "b", "c"), "noise" = noise1)
)
remove_custom_noise(synth_spec = synth_spec)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.