Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: compare values while value on other column remains the same

by linseyr (Acolyte)
on Sep 21, 2012 at 19:47 UTC ( #994985=note: print w/ replies, xml ) Need Help??


in reply to Re: compare values while value on other column remains the same
in thread compare values while value on other column remains the same

Actually, my output would be:

$chr $begin $end $id $average
But I just wanted to start with calculating. I would like to calculate the average difference between the 2 columns (5 and 6) for the same id. So for line 3,4,5 I would like to calculate the average difference between column 5 and 6. And for the lines for which only one line has that id, like line 1 I just want to calculate the difference between column 5 and 6, since there is no average to calculate. I only want to output the lines that have a average difference > 0.2


Comment on Re^2: compare values while value on other column remains the same
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (13)
As of 2015-07-31 09:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (276 votes), past polls