[R] Correlation matrix for data in long format
Serguei Kaniovski
Serguei.Kaniovski at wifo.ac.at
Tue Jan 29 12:22:02 CET 2008
Hello,
I cannot figure out how to use "tapply" to compute the correlation matrix
in the variable "x" between the states? The data is in long format, e.g.:
state,year,x
Alabama,2001,0.45
Alabama,2002,0.47
Alabama,2003,0.48
Alabama,2004,0.44
Arizona,2001,0.34
Arizona,2002,0.32
Arizona,2003,0.38
Arizona,2004,0.36
Thank you in advance for your help,
Serguei Kaniovski
More information about the R-help
mailing list