Skip to content
Prev 397649 / 398500 Next

Creating model formulas programmatically

Another solution.  reformulate + substitute + as.formula:

substitute(~ (.)^2, list(. = reformulate(somenames)[[2]])) |> as.formula()
On Sat, Mar 29, 2025 at 5:31?PM Bert Gunter <bgunter.4567 at gmail.com> wrote: