A calibratable parameter is identified by its group, name and index
(the columns of parameters()). These helpers turn that triple into a single
string – the full name, group/name[index] – and back. Calibration and
sensitivity tools use the full name as a key, for example in PEST++ control
files and results tables, where a parameter has to be one token.
The format is fixed because the strings are stored: a missing group or index
is written as NA, so NA/inflow/1 encodes to "NA/inflow[1]" and
NA/ce/NA to "NA/ce[NA]".
Decoding splits at the first / and the last [...]. The group
therefore cannot itself contain a /, and a group literally called "NA"
decodes as a missing group. A name may contain / (for example
"mixing/coef_mix_conv") and [.
Value
encode_param() returns a character vector of full names, recycled
like paste0(); character(0) when group, name and index are all
empty.
decode_param_full() returns a data.frame with columns group, name and
index, one row per element of name_full.
decode_param() returns the name part only. Elements that are not in the
group/name[index] format (and NA) decode to NA.
