Skip to contents

The 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:

Usage

nlmixr_object_complicate(fit, object, data)

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, mirroring assign_origData().

Value

The modified fit.

Details

  • re-derives parameter labels and the metadata environment from object and writes them back onto fit$ui$iniDf$label and fit$ui$meta, and

  • replaces fit$env$origData with the original data.

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().