Add a new flag or value option or adjust the value/presence of an existing one.
Arguments
- record
An nmrec_record object.
- name
Name of option to select. Any valid spelling of the option name is allowed.
- value
Value to assign to option. For a value option, the specified value can be anything that can be formatted to a string. For a flag option, any non-
NULLvalue results in the name being included in the record. PassingNULLdrops the option from the displayed record.
See also
set_param for setting parameter options from values, nmrec_option for a description of option types
Examples
ctl <- parse_ctl(nmrec_examples[["bayes1"]])
ests <- select_records(ctl, "est")
# Get method for first estimation record.
set_record_option(ests[[1]], "meth", "nuts")
ests[[1]]
#> $EST METHOD=nuts MAPITER=0 INTERACTION FILE=example1.ext NITER=500
#> PRINT=5 NOABORT SIGL=4 CTYPE=3 CITER=10
#> CALPHA=0.05 NOPRIOR=1 NSIG=2
#>
#>
