Cross tabulation - someone please help if you can



Hi,

I need advise re the best data structure to use for representing data
in aggregated form. I am looking to do something like this
Year 1 Year 2
number percent number percent ...

MAJ 66 0.0 61 0.0 ...
GRAD 0 0.0 0 0.0 ...
NOTA 0 0.0 3 0.0 ...
TOTAL 66 100.0 66 100.0 ...

The example shown above is my output from a current program. I will not
include it here because I don't want bring too much focus to the
program itself. The problem is that I can't get the percent values to
come out correctly although the number part is right. I really don't
know what else to do after two days of looking at this code. The
question is, what data structure is best suited to do this type of
work. I tried using a hashtable [] where each hash table in the array
held data for one group. So for the data above I would have five
hashtables in the array each holding Maj, Grad, Nota and Total data
items as keys. The value part is a class that has number and percent
along with some other details.

Any help will be much appreciated. Please let me know if it is helpful
for you to see the code so far.

-Reuben

.



Relevant Pages

  • Help - cross tabulation
    ... I need advise re the best data structure to use for representing data ... in aggregated form. ... I tried using a hashtable where each hash table in the array ... hashtables in the array each holding Maj, Grad, Nota and Total data ...
    (comp.lang.java.programmer)
  • Re: Latest version of glossary
    ... such as XML, refer to the use of the term within that "namespace" using ... An n-dimensional data structure, S, is one where each element of S ... Whenever mathematics is applied to anything, ... associative array (while trying to do something in JavaScript, ...
    (comp.databases.theory)
  • Re: how to read dynamic data structures from the kernel (was Re: reading routing table)
    ... could give us individual entries of the data structure on each call, ... steps for any given kernel subsystem -- we have data structures, ... bumping the references and adding pointers to the array. ... the global locks, and proceed lock, externalize, unlock, and copyout each ...
    (freebsd-net)
  • Re: Looking for advise on storring a complex array
    ... hashes etc. ... The trick is that I would not like to have to read back the entire array ... but you should look into using a database with a few ... This *really* depends on your data structure. ...
    (perl.beginners)
  • Re: Help with effective algorithm
    ... either you have a data structure that supports your need (object graph->Tree ... you have a long construction time and a large memory ... > The data I recieve in input is two hashtables from selialized source first ... > the second is Parent/Child relation, where Child and Parent are IDs from ...
    (microsoft.public.dotnet.languages.csharp)