Skip to content
Prev 278577 / 398502 Next

simplify source code

Hi

I would like to shorten

mod1 <- nls(ColName2 ~ ColName1, data = table, ...)
mod2 <- nls(ColName3 ~ ColName1, data = table, ...)
mod3 <- nls(ColName4 ~ ColName1, data = table, ...)
...

is there something like

cols = c(ColName2,ColName3,ColName4,...)

for i in ...
   mod[i-1] <- nls(ColName[i] ~ ColName1, data = table, ...)

I am looking forward to help

Christof