--- ray/doc/man/man1/total.1 2005/07/13 15:21:28 1.6 +++ ray/doc/man/man1/total.1 2021/11/16 03:30:45 1.12 @@ -1,4 +1,4 @@ -.\" RCSid "$Id: total.1,v 1.6 2005/07/13 15:21:28 greg Exp $" +.\" RCSid "$Id: total.1,v 1.12 2021/11/16 03:30:45 greg Exp $" .TH TOTAL 1 2/3/95 RADIANCE .SH NAME total - sum up columns @@ -19,6 +19,10 @@ total - sum up columns ][ .B \-o{f|d} ][ +.B "\-in M" +][ +.B "\-on M" +][ .B \-tC ][ .B \-N @@ -64,6 +68,9 @@ The .I \-m option can be used to compute the mean rather than the total. For sums, the arithmetic mean is computed. +If a power is also specified using the +.I \-s +option, the inverse power will be applied to the averaged result. For products, the geometric mean is computed. (A logarithmic sum of absolute values is used to avoid overflow, and zero values are silently ignored.) @@ -106,25 +113,34 @@ In addition, the .I \-r option can be specified to override reinitialization and thus give a running total every N lines (or every blank line). +This option also turns off the usual output flushing at each total. If the end of file is reached, the current total is printed and the calculation is reset before the next file (with or without the .I \-r option). .PP The +.I \-in +option if present, will limit the number of input records read +(per input file). +The +.I \-on +option may be used to limit the total number of outut records produced. +.PP +The .I \-tC option can be used to specify the input and output tab character. The default tab character is TAB. .PP If no files are given, the standard input is read. -.SH EXAMPLE +.SH EXAMPLES To compute the RMS value of colon-separated columns in a file: .IP "" .2i -total -t: -m -s2 input +total \-t: \-m \-s2 input .PP To produce a running product of values from a file: .IP "" .2i -total -p -1 -r input +total \-p \-1 \-r input .SH BUGS If the input files have varying numbers of columns, mean values will certainly be off. @@ -135,4 +151,4 @@ the tab character is white. .SH AUTHOR Greg Ward .SH "SEE ALSO" -cnt(1), neaten(1), rcalc(1), rlam(1), tabfunc(1) +cnt(1), neaten(1), rcalc(1), rcollate(1), rlam(1), rsplit(1), tabfunc(1)