It appears that the most recent thread on this topic is found here.
Maybe it is best to continue the discussion within that thread only.
Yes.. it is confusing and my head is still spinning..
You could do peak detection firstly to find the R peak position and then, RR interval could be easily calculated.
If you have detected the R peak positions, you could get RR interval (n) = R position (n)- R position (n-1). n is the beat number.