[R] another very simple loop question

Brian Quinif bquinif at gmail.com
Fri Apr 14 06:09:32 CEST 2006


I have a dataset with 4 years of students, and normally I want to
estimate things using each individual year, so I have a for loop as
follows

for (i in 1:4){}

However, the only way I know how to calculate estimates using all four
years of data is to put the estimations outside of the loop.  Is there
anyway to make a for loop that uses all four years at once, then uses
each individual year?

Thanks,

BQ




More information about the R-help mailing list