[R] match matrices of different lengths

2012-01-05 Thread Thijs vanden Bergh
was trying to match different matrices of different lengths with in the first collumn date and time info (yearmonthdayhourminute). the routine needs to return NA´s where data of either of the matrices is non existent. have been trying the following: x - c(200112030003, 200112030004,

Re: [R] match matrices of different lengths

2012-01-05 Thread Justin Haynes
see ?merge merge(xx,aa,by.x='x',by.y='a') x y b 1 2.00112e+11 1.0 1.2 2 2.00112e+11 1.1 1.9 making the two matricies time series does not mean that R knows that the first column is a datetime. and depending on your desired result, that may not be important. hope that helps,