Find the average based on similar names in the first column
I have a table, say this:
I want a code that will sort my data according to the first column and for ALL columns with the same name, calculate the average of each of the corresponding columns. In this case it would be:
If the 4th column has - sign then the names in 3rd column has to change to some user defined names (as shown in output).
Thanx
input1
1 a aaaaa +
2 b bbbbb +
3 c ccccc +
4 d ddddd +
5 e eeeee +
6 f xxxxx +
8 h hhhhh +... (8 Replies)
Hi Friends,
In continuation to my earlier post
https://www.unix.com/shell-programming-scripting/99166-script-find-average-given-column-also-specified-number-rows.html
I am extending my problem as follows.
Input:
Column1 Column2
MAS 1
MAS 4 ... (2 Replies)
Hi,
I'm new to shell programming, can anyone help me on this? I want to do following operations -
1. Average salary for each country
2. Total salary for each city
and data that looks like -
salary country city
10000 zzz BN
25000 zzz BN
30000 zzz BN
10000 yyy ZN
15000 yyy ZN
... (3 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I am trying to complete a script which will allow me to find:
a) reads a value from the keyboard. (ask the... (4 Replies)
Hi i have data with two columns like below.
I want to find average of column values like if the value in column 2 is between 0-250000 the average of column 1 is some xx and average of column2 is ww then if value is 250001-5000000 average of column 1 is yy and average of column 2 is zz.
And my... (5 Replies)
Hi,
I would like to calculate the average of column 'y' based on the value of column 'pos'.
For example, here is file1
id pos y c
11 1 220 aa
11 4333 207 f
11 5333 112 ee
11 11116 305 e
11 11117 310 r
11 22228 781 gg
11 ... (2 Replies)
Hi,
My input file
Gene1 1
Gene1 2
Gene1 3
Gene1 0
Gene2 0
Gene2 0
Gene2 4
Gene2 8
Gene3 9
Gene3 9
Gene4 0
Condition:
If the first column matches, then look in the second column. If there is a value of zero in the second column, then don't consider that record while averaging.
... (5 Replies)
Discussion started by: jacobs.smith
5 Replies
LEARN ABOUT DEBIAN
latency
LATENCY(1) Xenomai LATENCY(1)NAME
latency - Xenomai timer latency benchmark
SYNOPSIS
latency [options]
DESCRIPTION
latency is part of the Xenomai test suite. It is a timer latency benchmark program. The system must run a suitable Xenomai enabled kernel
with the respective module (xeno_timerbench).
OPTIONS
latency accepts the following options:
-h print histograms of min, avg, max latencies
-s print statistics of min, avg, max latencies
-H <histogram-size>
default = 200, increase if your last bucket is full
-B <bucket-size>
default = 1000ns, decrease for more resolution
-p <period_us>
sampling period
-l <data-lines per header>
default=21, 0 to supress headers
-T <test_duration_seconds>
default=0, so ^C to end
-q supresses RTD, RTH lines if -T is used
-D <testing_device_no>
number of testing device, default=0
-t <test_mode>
0=user task (default), 1=kernel task, 2=timer IRQ
-f freeze trace for each new max latency
-c <cpu>
pin measuring task down to given CPU
-P <priority>
task priority (test mode 0 and 1 only)
AUTHOR
latency was written by Philippe Gerum <rpm@xenomai.org>. This man page was written by Roland Stigge <stigge@antcom.de>.
2.6.0 2008-04-19 LATENCY(1)