[R] FW: reshaping data

Lo, Ken ken.lo at roche.com
Wed Oct 21 21:37:30 CEST 2009


I apologize for the previous post using HTML.  Haven't posted for a while and e-mail client default.

Best,

Ken


Hi all,

I have a matrix of correlation values between all pairwise comparison in an experiment.  For example, I have 2 time points (1,2) each in triplicate. Thus, I have the following matrix

	 1-1	 1-2	 1-3	 2-1	 2-2	 2-3
 1-1	NA	...	...	...	...	...
 1-2	...	NA	...	...	...	...
 1-3	...	...	NA	...	...	...
 2-1	...	...	...	NA	...	...
 2-2	...	...	...	...	NA	...
 2-3	...	...	...	...	...	NA

What I'd like to do is to reshape the data so that it would be easy for me to summarize all the correlation values across the triplicates (i.e. mean) for time point 1 and 2.  It sounds as though the reshape package should be able to do this, but the solution is not obvious to me.  Can anybody help?

Best,

Ken


More information about the R-help mailing list