I have two matrices (see example below) and I want the differences for the 
matching row numbers, but the row numbers are not identical in the two 
matrices. There are probably many ways to do this. Anyone know of any easy 
way to do this? I could loop over them, but you know what they say about for 
loops... Thanks, Roger
 > out.r[1:5, 1:3]
1 2 3
1100 -0.0992 -0.0802 -0.0653
1200 -0.1242 -0.0417 0.0082
1300 -0.1681 -0.0211 -0.0958
1400 -0.0985 -0.1217 0.0026
1500 -0.0318 -0.0437 -0.0302
> out.p[1:5, 1:3]
1 2 3
1100 -0.0564 -0.0573 -0.0224
1200 0.0528 -0.1134 -0.1186
1400 -0.0144 -0.1079 NA
1500 0.0919 -0.0371 -0.1602
1600 NA NA NA

	[[alternative HTML version deleted]]


