Use a boolean array having the same shape as the data. By the way, in J6.02 (and also per the IEEE specs):
_%_ |NaN error | _ %_ ----- Original Message ----- From: "Philip A. Viton" <[EMAIL PROTECTED]> Date: Friday, September 5, 2008 10:18 Subject: [Jprogramming] data-munging in J To: [email protected] > > I've just finished a rather complicated bit of data munging, > which > required me to aggregate numeric data in various ways: this is > duck-soup for J, given its ability to group subsets of the data > into > boxes, and then operate on the boxes. > > But what made the task truly difficult was the handling of > missing > data. The problem of keeping track of which items were missing > and > which were "real" almost convinces me that J is not an > appropriate > tool for this kind of task. R is one language that does have > built-in > facilities for missing data, but I don't think R has J's boxing > power, which was needed here. > > Does anyone have any ideas about how J might be coerced into > being > more effective here? Using _ (infinity) for missing data > *almost* > works (at least for non-negative data), except that 0 = _ % _ ; > and 0 > is a possible "real" value. I suppose one could write > substitute > verbs for the needed arithmetic operators, and even do > element-by-element processing there; but this sort of negates > the > value of J in the first place. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
