Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: transforming XY data to X and Multiple Y column data?

by LanX (Saint)
on Sep 27, 2010 at 09:31 UTC ( [id://862168]=note: print w/replies, xml ) Need Help??


in reply to transforming XY data to X and Multiple Y column data?

Hi

For me it looks like that you simply need an "array of hashes" as datastructure, with the IDs as keys.

The order of these keys should be preserved in an extra array (the "headline").

output would be simply:

# print headline-keys # loop over indices # print $index,"\t"; # loop over ids in headline # print $data[$index]{$id},"\t"; # print newline

Hope this gives you the basic idea how to do it by yourself.

If data entries are to long for tab-delimiters you should have a look at format

Cheers Rolf

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://862168]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-25 12:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found