Re-attach labels, metadata, and original data to a simplified fit
Source:R/simplify.R
nlmixr_object_complicate.RdThe inverse of nlmixr_object_simplify(). Given a fit produced from the
simplified, label-and-meta-stripped model, plus the original model
function and the original data, this function:
Arguments
- fit
An estimated nlmixr2 fit produced from the simplified model.
- object
The original model function (or object) the fit was derived from. Its labels and metadata are read back onto
fit.- data
The original data the fit corresponds to (before
nlmixr_data_simplify()reduced its column set). Must have the same number of rows as the data currently stored on the fit, mirroringassign_origData().
Details
re-derives parameter labels and the metadata environment from
objectand writes them back ontofit$ui$iniDf$labelandfit$ui$meta, andreplaces
fit$env$origDatawith the originaldata.
This is what makes label/meta edits in the source model cheap under
targets: the cache hash for the simplified model object is independent
of labels and metadata, so tar_make() only re-runs this re-attachment
step (and the cheap _object_simple step) when only labels or metadata
change.
This function is typically not invoked directly by end users; it is the
command for the final target produced by tar_nlmixr().
See also
nlmixr_object_simplify(), assign_origData().
Other Simplifiers:
nlmixr_data_simplify(),
nlmixr_object_simplify()