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

Re: how to sum over rows based on column headings in perl

by Not_a_Number (Prior)
on Jul 29, 2015 at 22:25 UTC ( [id://1136803]=note: print w/replies, xml ) Need Help??


in reply to how to sum over rows based on column headings in perl

You have a problem in your data. Ignoring the first column, you have seven columns of headers but only six columns of actual data:

G1 G1 G1 G1 G2 G2 G3 W W M W W M W W W W W W ...

Update: I see now that anonymonk had already spotted this...

Update2: Corrected miscount

Replies are listed 'Best First'.
Re^2: how to sum over rows based on column headings in perl
by angerusso (Novice) on Jul 30, 2015 at 19:45 UTC
    Sorry I have updated my example data matrix and the updated my complete code which is causing me problems as I don't know how to update the hash outside the for loop over columns as I want to sum over rows, not columns. Any additional help will be greatly appreciated.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-26 00:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found