Skip to content
Prev 277585 / 398506 Next

calculating time interval distributions

Your question seems rather poorly specified to me, and you may have to
clarify it further, but I'll make a stab at it.

IF one can assume that:

1. "a" must occur before "b", "b" before "c" etc.   AND
2. "sec" is always increasing

THEN

z <- tapply(sec, ind, FUN = min)

gives the first appearance sec value for each letter and

outer(z,z,"-")

gives the matrix of differences (in which the upper triangle is the
negative of the lower)

Is that what you wanted?

-- Bert
On Wed, Nov 16, 2011 at 6:00 AM, Grant Gillis <grant.j.gillis at gmail.com> wrote: