JOINNUM

Section: User Commands (1)
Updated:
Index
Return to Main Contents
 

NAME

joinnum - join two-column files of numbers into one file, keyed on first column  

SYNOPSIS

joinnum file1 file2 ...  

DESCRIPTION

Joinnum merges the data from several analysis(1) graphs that have been saved using its Bins-save operation, by matching up numbers in the first column of each saved file. It can handle from 2 to 100 input files, whose names must be specified as command line arguments. One of these file names can be a single hyphen (-), which will cause input to be read from the standard input. The merged output is sent to the standard output, which should be redirected to the file you want to create.

Each input file should contain lines of real numbers (floating point numbers in ASCII form), with two numbers per line, separated by spaces, tabs, commas, colons, semi-colons, or parentheses. Blank lines, lines that don't begin with a number, or lines that are not of the right format are skipped, with a warning if the format is incorrect. This allows processing of untreated output from Bins-save, as the header and footer lines will simply be skipped. The first number is the key for merging, and all numbers in the first column are expected to be in ascending order. These will usually correspond to time values.

Joinnum matches up the numbers from the first column of each input file. Any lines containing numbers that don't match up in all files are thrown out. For every matching number found in all files, a line is output, containing this matching number from the first column of each file, followed by the corresponding number from the second column of each file, in the order the files are specified. The output contains one more column of data than there are files specified. The first column is the matching key, the second is from the first file (second column), the third is from the second file (second column), and so on. The output is suitable for plotting with the genplot(1) or makeplot program.

To generate input files from the analysis program, set the "Number list format" parameter to something like "x y\n", which will output two numbers, the X and Y values, followed by a newline character. Then, issue the Bins-save operation to save the data into the file you want. Be sure that the analysis you're running generates strictly increasing X values, so that the file can be properly merged.  

SEE ALSO

analysis(1), genplot(1)
 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 17:58:05 GMT, February 20, 2019
Copyright © G. R. Detillieux, Spinal Cord Research Centre, The University of Manitoba.