to "tag" the events where successive odd
id's corresponds to succesive active spells (&
succesive even id's corresponds to succesive gaps
between the spells).
Now from that I can easly find duration of each
spell. (I then imported those spell lengh in
spreadsheet to compute mean, median, max of the
spell duration etc, but it should be possible to
do it in ferret itself with little more play)
Solution 2)
But quickly going through steve's mail a while ago
I though it might be posible to use similar trick:
so what I did is - I filled the missing values in
the original data (above) with zero. Then defined
the event as before with slight twist:
let id1=var1[
l=@evnt:0.999]
! here any value between 0 and 1
would work
which gave desired result!
i.e.
let VAR1 = IF ATV_JA THEN ATV_JA ELSE 0
let ID_GOOD = VAR1[
L=@EVNT:0.999]
let ID_BAD = ATV_JA[L=@EVNT:1]
! just for illustration, this
doesn't work, using value between 0 & 1
also doesn't give desired result
list/l=181:245 atv_ja,id_bad,var1,id_good
(deleted lines)
ATV_JA ID_BAD VAR1 ID_GOOD
30-JUN-1990 00 / 181: .... 0.00 0.000 0.000
01-JUL-1990 00 / 182: .... 0.00 0.000 0.000
02-JUL-1990 00 / 183: 1.000 1.00 1.000 1.000
03-JUL-1990 00 / 184: 1.000 2.00 1.000 1.000
04-JUL-1990 00 / 185: 1.000 3.00 1.000 1.000
05-JUL-1990 00 / 186: 1.000 4.00 1.000 1.000
06-JUL-1990 00 / 187: .... 4.00 0.000 2.000
07-JUL-1990 00 / 188: .... 4.00 0.000 2.000
(deleted lines)
19-AUG-1990 00 / 231: .... 4.00 0.000 2.000
20-AUG-1990 00 / 232: .... 4.00 0.000 2.000
21-AUG-1990 00 / 233: .... 4.00 0.000 2.000
22-AUG-1990 00 / 234: 1.000 5.00 1.000 3.000
23-AUG-1990 00 / 235: 1.000 6.00 1.000 3.000
24-AUG-1990 00 / 236: 1.000 7.00 1.000 3.000
25-AUG-1990 00 / 237: 1.000 8.00 1.000 3.000
26-AUG-1990 00 / 238: .... 8.00 0.000 4.000
27-AUG-1990 00 / 239: .... 8.00 0.000 4.000
28-AUG-1990 00 / 240: .... 8.00 0.000 4.000
29-AUG-1990 00 / 241: 1.000 9.00 1.000 5.000
30-AUG-1990 00 / 242: 1.000 10.00 1.000 5.000
31-AUG-1990 00 / 243: 1.000 11.00 1.000 5.000
01-SEP-1990 00 / 244: .... 11.00 0.000 6.000
02-SEP-1990 00 / 245: .... 11.00 0.000 6.000
I would like to thank your both for sharing your
ideas that help me come up with these solutions.
Best regards,
Jagadish