Re: Cross tabulation - someone please help if you can
- From: Ross Bamford <ross@xxxxxxxxxxxx>
- Date: Fri, 29 Apr 2005 03:26:46 +0100
On Thu, 2005-04-28 at 17:51 -0700, rn29 wrote:
> Thanks!
>
> your thoughts are good but I think I failed to properly communicate the
> problem. Now I am forced to post the code and perhaps that will help
> see what i am trying to do. The sample table I provided is actually
> what the final output should look like except the percent calculation
> needs to be right. I am posting here the main method. Everything works
> well except the first row output in the percent column all resolve to
> 100% and while debuging, I have determined that most of the percent
> values are not even being innitialized. Where is the problem coming
> from?
Well, looking through that nothing jumps out immediately. It's a bit
unconventional but I can't think of a reason it shouldn't work. Where to
go next:
TabulateTerm - is that your own class? It seems to me the most likely
place to start. How/where is the percentage actually calculated? From
what (variables)? Where do they get their values from? I assume you're
using both the column and the row - are you sure they're the correct
(paired) column and row?
Check your code is executed: A simple System.out.println within the
if/elseif construct(s) might help to trace things. Perhaps the values
aren't initialized because none of the ifs match?
Another idea is to println() your Hashtable.toString() once it's
populated, to check it's laid out how you expect.
Hope that helps,
Ross
--
[Ross A. Bamford] [ross AT the.website.domain]
Roscopeco Open Tech ++ Open Source + Java + Apache + CMF
http://www.roscopec0.f9.co.uk/ + info@xxxxxxxxxxxxxxxxxx
.
- Follow-Ups:
- References:
- Cross tabulation - someone please help if you can
- From: rn29
- Re: Cross tabulation - someone please help if you can
- From: Ross Bamford
- Re: Cross tabulation - someone please help if you can
- From: rn29
- Cross tabulation - someone please help if you can
- Prev by Date: Re: uploading files..
- Next by Date: Re: Java StreamTokenizer
- Previous by thread: Re: Cross tabulation - someone please help if you can
- Next by thread: Re: Cross tabulation - someone please help if you can
- Index(es):