On to function #2 that I need (see how-to #1 for background) .... Given data set B below, moving from first to last, if the CLOSE value (column 4) is zero, replace the zeros in columns 1 to 5 with the preceding day's data (columns 1 to 5). Note that multiple zero rows will therefore have the same values for columns 1 to 5. The final resulting data set should have no zero values in columns 1 to 4. (It's possible, due to vendor glitches, that volume in column 5 may have a value of zero--ignore that.) Please don't overlook it, but I have another question at the end of this message.
DATA SET B: 1952-05-22,261.78,264.02,261.54,263.33,1360000 1952-05-23,263.33,264.59,262.54,263.27,1150000 1952-05-24,263.27,263.47,262.84,263.23,300000 1952-05-25,0,0,0,0,0 1952-05-26,263.23,264.87,262.62,264.22,940000 1952-05-27,264.22,265.17,262.82,263.92,1040000 1952-05-28,263.92,264.54,262.25,262.78,1130000 1952-05-29,262.78,263.51,261.62,262.94,1100000 1952-05-30,0,0,0,0,0 1952-05-31,0 0 0 0 0 1952-06-01,0,0,0,0,0 1952-06-02,262.94,264.61,261.48,262.31,1190000 1952-06-03,262.31,262.82,260.83,262.09,940000 1952-06-04,262.09,264.20,261.91,263.67,1200000 1952-06-05,263.77,266.80,263.77,266.29,1410000 1952-06-06,266.29,268.95,266.21,268.03,1520000 1952-06-07,0,0,0,0,0 1952-06-08,0,0,0,0,0 1952-06-09,268.03,269.92,267.67,269.15,1270000 1952-06-10,269.15,269.15,266.76,267.67,1220000 1952-06-11,267.67,268.52,266.33,267.93,1190000 Additional how-to question: if I wanted to delete every February 29 leap day (date and data) from an entire set of calendar day data (my Dow Industrials data goes back to 1885) in order to have consistent 365-day years, how would I accomplish that in J? Again, thanks in advance for any and all help! Harvey ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
