John Nott wrote:
> Good Points!!! (hope my explanation makes sense!)
> 
> 1) Start off writing a program that works on a small amount of data,
> e.g. a file with this in it:
> 
> 10,20,30
> 40,50,60
> 
> 2) Always post an example of the format of your data, so we all know
> what you are dealing with.
> 
> The format of my data is a .csz file which has been created from an 
> excel sheet. It has 19 columns and 649 rows. The first row is a column 
> title (eg: zone_ID, Population, Population0_16.... etc) the following 
> rows are all integer values. So its pretty much a standard excel sheet.
> 

No, no, no.  See 1).  Posting an example of the format of your data 
would look like this:

10,   20,      4

or

3,6,7

> 3)  Clearly state what the results should be.  At this point I still
> don't have any idea whether you want integers in your matrix or strings.
> 
> I would like (within OmniTrans) to read the data in and store it in a 
> matrix. As a very green ruby programmer (dropped in at the deep end!), 
> If i was able to achieve this, that would be a major milestone for me.
> 

As far as I can tell OmniTrans is not a ruby gem, nor is it is easy to 
locate a download, so I think you are on your own for that part of it.


> 4) State what you intend to do with the result, so that people will have
> a better idea of *what you really need* rather that what you say you
> want.
> 
> My longer term objective is to do some fixes on this data. For example. 
> I may want to say "look at cell (15,1), if this cell is greater than 
> (15,5) then change this cell to the value of (15,15) - that sort of 
> thing. An even longer term objective is to take the 'fixed' dataset and 
> link it via ODBC to a data warehouse (this is way off as you can 
> imagine)
> 

Ok.  The code I posted shows you how to get the data from a file and 
turn it into an integer; it's up to you to put it in Omni Trans the way 
you want.  Once again, to make things easier on yourself start with a 
file that contains 2 lines of data, and then you should get be able to 
get something working.
-- 
Posted via http://www.ruby-forum.com/.