View source: R/control_check.R
| tulpa_check_control | R Documentation |
control = list() surface against its canonical key setFront-door fitters across the tulpa* ecosystem carry their perf /
numerical / tuning knobs in a single control list (design principle 6).
Without a name check a misspelled knob is a silent no-op –
control$adaptve_grid fits the default and reports nothing. This validates
the names a caller supplied against the whitelist of what the target fitter
actually reads, and errors listing the allowed set.
tulpa_check_control(control, allowed, where)
control |
The |
allowed |
Character vector of accepted knob names. |
where |
Name of the calling fitter, used in the error message. |
Consumer packages (tulpaRatio, tulpaObs) call this with their own key
registry rather than reimplementing the check.
invisible(NULL), called for the side effect of erroring on an
unknown or unnamed knob.
tulpa_check_control(list(max_iter = 50), c("max_iter", "tol"), "my_fit")
try(tulpa_check_control(list(max_itr = 50), c("max_iter", "tol"), "my_fit"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.