These are great, thanks. I always forget about paste().
=== Richard Sherman rss....@gmail.com > On Aug 22, 2018, at 17:56, Fox, John <j...@mcmaster.ca> wrote: > > fm <- vector("character",6) > fm[1]<- "mpg ~ hp" > for(i in 2:6)fm[i]<- paste0(fm[i-1]," + I(hp^", i,")") ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.