embed_fit_call: Make an nls model call self-contained

View source: R/aanalyse_kinetics_helpers.R

embed_fit_callR Documentation

Make an nls model call self-contained

Description

stats::nls() stores its call arguments as the expressions it was called with (formula, .data, start[free]), resolvable only in the fitting frame. Evaluating them in that frame and storing the values lets stats::update(), stats::profile(), and insight::get_data().

Usage

embed_fit_call(model, env = parent.frame())

Arguments

model

An nls model.

env

The fitting frame the call arguments resolve in; default the caller of this function.

Value

model with every call argument replaced by its value.


mnirs documentation built on Sept. 13, 2026, 1:06 a.m.