gbbin1
A program to bin data
Usage
gbbin [options]
Overview
Compute binned statistics. Data are read from standard input as records (X,Y1,Y2,...). Equipopulated bins are built with respect to the first field X. Option -O decide which statistics are printed for each bin. With options -x, -y or -c elements in different bins are split in different columns.
Options
-
-n -
set the number of equipopulated bins (default 10)
-
-w -
min,max set manually the binning window. Ignored with
-x,-y and-c
-
-O -
set the output with a comma separated list of variables: xmean, xmin, xmax, xstd, xmedian, ymean, yadev, ystd, yvar, yskew, ykurt, ymin, ymax, ymedian, num (default xmean, ymean)
-
-c# -
the values in column # are split in different columns; # can be a comma separated list of columns
-
-x -
equivalent to
-c1
-
-y -
equivalent to
-c2
-
-F -
specify the input fields separators (default " \t")
-
-v -
verbose mode
Examples
- gbbin -n 20 < file
-
split the records (line) in 20 bins according to first field. Print the average value of the bin entries for each column. If 'file' has 3 columns, the output has twenty rows and three columns.
- gbbin -O ymedian < file
-
bin the records with respect to the first value and print the median value of the other columns in each bin
- gbbin -c 3 < file
-
the binned values of the third columns are printed on separate columns. The output has ten columns.
Releases
5 releases since Debian 9 (Stretch); the text changed 2 times.