Add a new flag or value option or adjust the value/presence of an existing one.

set_record_option(record, name, value)

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-NULL value results in the name being included in the record. Passing NULL drops 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
#> 
#>