Generate R code that recreates a module with its current configuration. Useful for documenting optimized configurations and ensuring reproducibility.
Arguments
- module
A DSPrrr module to export.
- name
Character; variable name for the module in generated code. Default is "mod".
- include_demos
Logical; whether to include demonstration examples in the generated code. Default is TRUE.
- file
Optional file path to write the code to. If NULL (default), returns the code as a character string.
Value
If file is NULL, returns the R code as a character string
(invisibly). If file is specified, writes to file and returns invisibly.
See also
Other optimizer accessors:
apply_best_config(),
best_demos(),
best_params(),
config_diff(),
optimization_summary(),
top_trials()
