Parsing a record populates its values
field with elements and options. An
option is an R6 object that inherit from nmrec_option
.
positional (nmrec_option_pos
): the option is rendered as the value
field.
For example, the file name from a $DATA
record with a value of
"foo.csv" would be rendered as "foo.csv".
flag (nmrec_option_flag
): if value
is not NULL
, the option is
rendered as the name_raw
field.
For example, the interaction flag for an $ESTIMATION
record with a
name_raw
value of "interact" and a value of TRUE
would be rendered as
"interact".
value (nmrec_option_value
): render name-value pair from name_raw
field and value
field, separating the values by the sep
field value.
For example, the maxevals option for a $ESTIMATION
record with a
name_raw
field of "MAX", a value
field of "999", and sep
field of
" = " would be rendered as "MAX = 999".
record name (nmrec_option_record_name
): this option derives from
nmrec_option_flag
and tailors formatting for record names.
For example, a name_raw
value of "est" for an $ESTIMATION
record would
be rendered as "$est".
nested (nmrec_option_nested
): this option derives from
nmrec_option_pos
, replacing the simpler value
field with a values
field that is a list of items to render. Like the values
field of a
record objects, this consists of elements and options. It is useful for
THETA
, OMEGA
, and SIGMA
values, which can have more complex
formatting and have attached options (such as "FIXED").
get_record_option()
for getting a specified option from a record
object.