[R] lm to an array

John Charles Considine vinum at iinet.net.au
Sun Sep 18 03:30:09 CEST 2005


I have an array of dimensions 4x8x15, eg,

, , WA

       1997 1998 1999 2000 2001 2002 2003 2004
actual   19   23   NA   40   62   65   64  100
minus1   NA   20   23   NA   42   57   79   84
minus2   NA   NA   21   27   NA   52   62   83
minus3   NA   NA   NA   24   30   NA   55   65

How do I call lm to evaluate 'minus1:minus3' against 'actual' such that
the results are tabulated by the third dimension?

John Charles Considine




More information about the R-help mailing list