Builds a continuous cardiac phase that advances linearly from 0 to
\(2\pi\) between consecutive R-peaks (wrapped per beat). Samples outside the
first/last beat are NA.
Examples
rpeaks <- seq(10, 1000, by = 25)
ph <- cardiacPhaseFromPeaks(rpeaks, 1000)