Re: [R] Merge data under conditions

2011-03-13 Thread flymer
Thanks to both of you for your help! Jim, my problem is to match some observations of a time serie (vector 'a' in my example) with theoretical predictions of this process (vector 'b' in my example), with a small time lag between them. -- View this message in context:

[R] Merge data under conditions

2011-03-12 Thread flymer
Dear All, Debuting in R, I'm facing a problem. I have 2 vectors, say 'a' et 'b', and I'd like to merge them according to the proximity of their variable 'time'. How to do to keep elements which satisfy (for example) 'a$time-b$time0.5'? For example : a time x 1 1.0 4 2 2.2 5 3 5.2 6 b