aboutsummaryrefslogtreecommitdiffstats
path: root/doc/info/median.texinfo
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-12-01 23:07:07 +0100
committerMattias Andrée <maandree@operamail.com>2015-12-01 23:07:07 +0100
commitc1581e769105967b1c10114027a1fb2027c1e80c (patch)
tree8110e663833a5d371a9c7eb543c71a91cb192fee /doc/info/median.texinfo
parentupdate dist (diff)
downloadmedian-1.2.tar.gz
median-1.2.tar.bz2
median-1.2.tar.xz
misc improvements1.2
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'doc/info/median.texinfo')
-rw-r--r--doc/info/median.texinfo128
1 files changed, 128 insertions, 0 deletions
diff --git a/doc/info/median.texinfo b/doc/info/median.texinfo
new file mode 100644
index 0000000..1255902
--- /dev/null
+++ b/doc/info/median.texinfo
@@ -0,0 +1,128 @@
+\input texinfo @c -*-texinfo-*-
+
+@c %**start of header
+@setfilename median.info
+@settitle median
+@afourpaper
+@documentencoding UTF-8
+@documentlanguage en
+@finalout
+@c %**end of header
+
+
+@dircategory Utilities
+@direntry
+* median: (median). Calculate the median values for a set of groups
+@end direntry
+
+
+@copying
+Copyright @copyright{} 2014 Mattias Andrée
+
+@quotation
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts. A copy of the license is included in the section entitled
+``GNU Free Documentation License''.
+@end quotation
+@end copying
+
+@ifnottex
+@node Top
+@top median -- Calculate the median values for a set of groups
+@insertcopying
+@end ifnottex
+
+@titlepage
+@title median
+@subtitle Calculate the median values for a set of groups
+@author by Mattias Andrée (maandree)
+
+@page
+@c @center `'
+@vskip 0pt plus 1filll
+@insertcopying
+@end titlepage
+
+@contents
+
+
+
+@menu
+* Overview:: Brief overview of @command{median}.
+* Invoking:: Invocation of @command{median}.
+* GNU Free Documentation License:: Copying and sharing this manual.
+@end menu
+
+
+
+@node Overview
+@chapter Overview
+
+@command{median} is command line tool for getting the median
+values of groups. For each input line it parses the first
+column, separated by a blank space, as a value and the remainder
+of the line as a key. If the line does not contain a blank
+space and entire line is parsed as a value and the key is an
+empty string. If the line however contains a blank space it is
+included in the key, thus a line contain only a value and a line
+contain a value followed by a blank space is not interpreted has
+having the same key. @command{median} outputs the median value
+for each key. In @command{median}'s current implementation the
+keys will be sorted in the output. Keys do not have to be sorted
+or groups. @command{median} will do its best to print the median
+of in the same format as the input values. The input for a group
+is of even number and is numerical the mean value of the two
+middle values is used, otherwise the lower of the two middle
+values is is used. Of course, if the number of values is odd,
+the middle value is always used and it does not matter whether
+the input is numerical or not.
+
+
+
+@node Invoking
+@chapter Invoking
+
+@command{median} is command line filter that does not take any
+arguments. See @ref{Overview} for detail about the input and
+output format.
+
+Simple example:
+@example
+$ cat <<EOF | median
+> -10
+> 2
+> 4
+> 3
+> 50
+> EOF
+3
+@end example
+
+Example with 3 groups, one non-numerical:
+@example
+$ cat <<EOF | median
+> 10 group 1
+> 20 group 1
+> 01 group 2
+> 02 group 2
+> a group 3
+> b group 3
+> c group 3
+> d group 3
+> EOF
+15 group 1
+01.5 group 2
+b group 3
+@end example
+
+
+
+@node GNU Free Documentation License
+@appendix GNU Free Documentation License
+@include fdl.texinfo
+
+@bye
+