fit_names: Alias fit column names that collide with model parameters

View source: R/aanalyse_kinetics_helpers.R

fit_namesR Documentation

Alias fit column names that collide with model parameters

Description

stats::nls() formula symbols must be disjoint: a name cannot be both a data column and a parameter. The fit data frame carries the channel names so the model predicts on them, so a channel named after a model parameter (or D, the amplitude used by enforce_direction()) is prefixed with . in the fit and in the stored model formula. Coefficients and results keep the original names.

Usage

fit_names(x, t, params)

Arguments

x, t

Character; the response and time channel names.

params

Character vector of the model parameter names.

Value

A length-2 character vector of the response and time column names to fit on.


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