Skip to content
Prev 343178 / 398513 Next

Operating on the value from row i and row i+1

Perhaps use approx() separately for each patient.

But your new example, with times 1, 2, 6, 8 does not match your first
example with times 0, 3, 9. Nor had you mentioned having multiple patients
before. So it is difficult to understand what you are really asking for.

None the less, approx() does reproduce the results you described in your
first description of the problem, so if your first example was meant to
represent one patient, then perhaps using approx() separately for each
patient will do the job.