Average is based on 2nd column if 2nd column values are in between 0-250000 average them then if values are in between 250001-500000 average them them if values are in between 500001-750000 average them the interval for each is 250000.
Your answer is almost near but i have huge data file to perform this so i may get error in final output.
Anyways thanks for replying.
---------- Post updated at 05:23 PM ---------- Previous update was at 05:05 PM ----------
Dear Guyz:)
I have 2 different input files like this. I would like to pick the values or letters from the inputfile2 based on inputfile1 keys (A,F,N,X,Z).
I have done similar task by using awk but in that case the inputfiles are similar like in inputfile2 (all keys in 1st column and values in... (16 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)
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)
I have a list of columns with values that I need to transform into a row containing the range of each column. For example:
"Column A"
1
2
3
4
10
12
14
15
16
17
18
"Column B"
1
4
5
6 (4 Replies)
Hello, I have a file with nearly 57K lines. I want to filter the lines based on the range of values in a column. For e.g. print lines whose 3rd filed is >=0.02.
Input file:
LOC_Os09g32030 LOC_Os02g18880 0.0200037219149773 undirected NA NA
LOC_Os03g58630 LOC_Os09g35690 ... (1 Reply)
Dear Experts,
Kindly help me please,
I have a big file where there is duplicate values in col 11 till col 23, every 2 rows appers a new numbers, but in each row there is different coordinates x and y in col 57 till col 74.
Please i will like to get a single value and average of the x and y... (8 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)
Im looking for a way to average the values in field 14 (when field 2 is equal to 2016) and fields 3 and 4 (when field 2 is equal to 2017).
Any help is appreciated.
001001 2016 33.22 38.19 48.07 51.75 59.77 67.68 70.86 72.21 66.92 53.67 42.31 40.15
001001 2017 ... (10 Replies)
Discussion started by: ncwxpanther
10 Replies
LEARN ABOUT DEBIAN
mintegrate
MINTEGRATE(1) User Commands MINTEGRATE(1)NAME
mintegrate - evaluate average/sum/integral/derivative of 1-d numerical data
SYNOPSIS
mintegrate [OPTION]... [FILE]
DESCRIPTION
mintegrate is a program to compute averages, sums, integrals or derivatives of numerical 1-d data in situations where ultimate numerical
precision is not needed.
OPTIONS -a compute mean value (arithmetic average) and standard deviation
-c compute integral on closed x-data interval; In case that dx is not specified by the '-d' flag, the data are supposed to be from an
irregular x-grid, and dx is computed separately for every x-interval. The integral is computed by the trapezoidal rule.
-d <float>
compute integral on open x-data interval with the specified dx; Can be used also in combination with '-D' and '-c'.
-D compute difference btw. numbers or derivative of the y-data; In the default scenario where x- and y-data column are same, the dif-
ference btw. the current and the previous data value will be output. In this case when '-d' is defined as 0, the x-data value will
be print out in front of the calculated difference. If x-and the y-column are different and if the x-data resolution is not defined
or it is !=0, then the derivative of the y-data is calculated. When the x-data resolution is constant, specify it explicitly by '-d'
to achieve a higher numerical precision by a 'leapfrog' algorithm.
-x <int>
x-data column (default is 1). If 0, the x-range is an index;
-y <int>
y-data column, where y=f(x) (default is 1)
-r x_0:x_1
x-data range to consider
-s print out accumulated y_i sums: x_i versus accumulated f(x_i); In the case of a closed integral you have to specify also the x-data
resolution dx (see '-d' above).
-S compute the accumulated y_i-sums and add it to the output
-p <str>
print format of the result ("%.10g" is default)
-t <str>
output text in front of the result (invalid with '-s' or '-S'); A blank can be printed by using a double underscore character '__'.
-T run a self-test that the program is working correctly
-V print version number
--version
output version and license message
--help|-H
display help
-h display short help (options summary)
If none of the options '-a', '-D', '-d', or '-c' is used, then the sum of the provided data will be computed. Empty lines or lines starting
with '#' are skipped.
This program is perfectly suitable as a basic tool for initial data analysis and will meet the expected accuracy of a numerical solution
for the most demanding computer users and professionals. Yet be aware that, although the computations are carried with double floating pre-
cision, the computational techniques used for evaluating an integral or a standard deviation are analytically low-order approximations, and
thus not intended to be used for numerical computations in engineering or mathematical sciences for cases where an ultimate numerical pre-
cision is a must. For deeper understanding of the topic see http://en.wikipedia.org/wiki/Numerical_analysis.
COPYRIGHT
Copyright (C) 1997, 2001, 2006-2007, 2009, 2011-2012 Dimitar Ivanov
License: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
mintegrate 2.2.1 February 2012 MINTEGRATE(1)