BSanders wrote: > > > ..... > lin[i] = lm(reservesub[,3]~ reservesub[,i+3]) > > For which I'm given 15 warning messages which say : > > "1: In lin[i] = lm(reservesub[, 3] ~ reservesub[, i + 3]) : > number of items to replace is not a multiple of replacement length" >
lin = list() for(i in 1:15){ b = rnorm(10) q = rnorm(10) #lin[i] = lm(b~q) #warnings lin[[i]] = lm(b~q) #warnings } Dieter -- View this message in context: http://r.789695.n4.nabble.com/How-can-I-index-multiple-linear-models-Without-getting-a-warning-tp3250535p3250594.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list 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.