[R] problems with for loop

Jorge Lampurlanes Castel jlampur at eagrof.UdL.es
Tue Jan 16 13:10:10 CET 2007


With this program I try to repeat analysis for different years. The
results of the analysis are not printed when in the loop, except for the
year sequence. What is wrong?

Thanks a lot.

for (i in 92:99){
	"YEAR =",i,"\n",
	canos1 <- subset (canos, canos$YEAR==i)
	LinearModel.1 <- lm(MM_P  ~ BLOC  + TIL, data=canos1)
	Anova(LinearModel.1, type="II")
	Anova(LinearModel.1, type="III")


Jorge Lampurlanés Castel
Departament d'Enginyeria Agroforestal
Escola Tècnica Superior d'Enginyeria Agrària
Universitat de Lleida
Avinguda Rovira Roure, 191

Tl.: +34 973 70 25 37
Fax.:+34 073 70 26 73
e-mail: jlampur at eagrof.udl.es

More information about the R-help mailing list