[R] Subset function of lm(); "rolling regressions"

Ole F. Christensen olefc at daimi.au.dk
Mon Feb 9 14:10:37 CET 2004


You need brackets in i:(i+25)

3:3+25

is not want you

3:(3+25)

is what you want.

to explicitly print out values in a for loop you need to use print

for (i in 1:10) {
  print(i)
}


Ole

-- 
Ole F. Christensen
Center for Bioinformatik
Aarhus Universitet
Ny Munkegade, Bygning 540
8000 Aarhus C




More information about the R-help mailing list