These are great, thanks.

I always forget about paste().

===
Richard Sherman
[email protected]



> On Aug 22, 2018, at 17:56, Fox, John <[email protected]> wrote:
> 
> fm <- vector("character",6)
> fm[1]<- "mpg ~ hp"
> for(i in 2:6)fm[i]<- paste0(fm[i-1]," + I(hp^", i,")")

______________________________________________
[email protected] 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.

Reply via email to