--- Chris Pelkie wrote:
I'm not saying CategoryStatistics is easy to understand, because it isn't, but
I think it does what you want already.
Open the dxsamples program called Categorical.net. Add a Print("rd") right
after ImportSpreadsheet to see the data structure and Execute. (state incomes
for 4 states; state name is string>>categorized to 00..03).
Keep the Message Window contents open, move the Print down to the output of
CategoryStatistics. Choose "max" from the Selector feeding CategoryStatistics
and execute again.
It sure looks to me like CategoryStatistics is now reporting 4 values: the max
i income for each state. Isn't that what you are asking for? You'll still need
to use Lookup to reassociate each max value via its categorized index with the
corresponding string, if you need to display a Legend for example.
Also, you can use 2 CategoryStatistics side by side (same input data), one for
"min" and one for "max", then Compute the difference to get a field of n data
values, the deltas.
--- end of quote ---
Chris,
I did as you suggested but I don't see that the output from CategoryStatistics
contains all of the data fields. For example, the data field in the
Categorical.net contains customer and income data for 3 states. After I use
the CategoryStatistics on the income data, the result includes the maximum
value of income for each of the 4 states but it doesn't include the what
customer data is associated with each of those max income values. Is there a
way to get that value?
thanks,
Susan Schwarz
Research Computing
Dartmouth College