STAT(1G) COMMAND REFERENCE STAT(1G)
NAME
stat - statistical network useful with graphical commands
SYNOPSIS
node-name [options] [files]
DESCRIPTION
The stat program is a collection of command level functions
(nodes) that can be interconnected using sh(1sh) to form a
statistical network. The nodes reside in /usr/bin/graf (see
graphics(1g)). Data is passed through the network as
sequences of numbers (vectors), where a number is of the
form:
[sign](digits)(.digits)[e[sign]digits]
evaluated in the usual way. Brackets and parentheses
surround fields. All fields are optional, but at least one
of the fields surrounded by parentheses must be present.
Any character input to a node that is not part of a number
is taken as a delimiter.
The stat nodes are divided into four classes:
Transformers,
which map input vector elements into output
vector elements;
Summarizers,
which calculate statistics of a vector;
Translators,
which convert among formats; and
Generators,
which are sources of definable vectors.
Below is a list of synopses for stat nodes. Most nodes
accept options indicated by a leading minus (-). In
general, an option is specified by a character followed by a
value, such as c5. This is interpreted as c := 5 (c is
assigned 5). The following keys are used to designate the
expected type of the value:
c characters,
i integer,
f floating point or integer,
file file name, and
Printed 4/6/89 1
STAT(1G) COMMAND REFERENCE STAT(1G)
string string of characters, surrounded by quotes to
include a shell argument delimiter.
Options without keys are flags. All nodes except generators
accept files as input, hence it is not indicated in the
synopsis.
Transformers:
abs [-ci] - absolute value
columns (similarly for -c options that follow)
af [-ci t v ] - arithmetic function
titled output, verbose
ceil [-ci] - round up to next integer
cusum
[-ci] - cumulative sum
exp [-ci] - exponential
floor
[-ci] - round down to next integer
gamma
[-ci] - gamma
list [-ci dstring] - list vector elements
delimiter(s)
log [-ci bf] - logarithm
base
mod [-ci mf] - modulus
modulus
pair [-ci Ffile xi] - pair elements
File containing base vector, x group size
power
[-ci pf] - raise to a power
power
root [-ci rf] - take a root
root
round
[-cipisi] - round to nearest integer, .5 rounds to
1
places after decimal point, significant digits
Printed 4/6/89 2
STAT(1G) COMMAND REFERENCE STAT(1G)
siline
[-ciifnisf] - generate a line given slope and
intercept
intercept, number of positive integers, slop
sin [-ci] - sine
subset
[-af bf ci Ffile ii lf nl np pf si ti] - generate
a subset
above, below, File with master vector, interval,
leave, master contains element numbers to leave,
master contains element numbers to pick, pick,
start, terminate
Summarizers:
bucket
[-ai ci Ffile hf ii lf ni] - break into buckets
average size, File containing bucket boundaries,
high, interval, low, number
Input data should be sorted
cor [-Ffile] - correlation coefficient
File containing base vector
hilo [- h l o ox oy]- find high and low values
high only, low only, option form, option form with
x prepended, option form with y prepended
lreg [-Ffile i o s] - linear regression
File containing base vector, intercept only,
option form for siline, slope only
mean [-ff ni pf] - (trimmed) arithmetic mean
fraction, number, percent
point
[-ff ni pf s] - point from empirical cumulative
density function
fraction, number, percent, sorted input
prod
- internal product
qsort
[-ci] - quick sort
rank
- vector rank
total
Printed 4/6/89 3
STAT(1G) COMMAND REFERENCE STAT(1G)
- sum total
var - variance
Translators:
bar [-a b f g riwixf xa yfya ylf yhf ] - build a bar
chart
suppress axes, bold, suppress frame, suppress
grid, region, width in percent, x origin, suppress
x-axis label, y origin, suppress y-axis label, y-
axis lower bound, y-axis high bound
Data is rounded off to integers.
hist [-a b f g rixf xa yfya ylf yhf ] - build a
histogram
suppress axes, bold, suppress frame, suppress
grid, region, x origin, suppress x-axis label, y
origin, suppress y-axis label, y-axis lower bound,
y-axis high bound
label
[-b c Ffile h p ri x xu y yr] - label the axis of
a GPS file
bar chart input, retain case, label File,
histogram input, plot input, rotation, x-axis,
upper x-axis, y-axis, right y-axis
pie [-b o p pni ppi ri v xi yi] - build a pie chart
bold, values outside pie, value as percentag
percentage(:=i), draw percent of pie, region, no
values, x origin, y origin
Unlike other nodes, input is lines of the form
[< i e f cc >] value [label]
ignore (do not draw) slice, explode
slice, fill slice, color slice c=(
black, red, green, blue)
plot [-a b cstringd f Ffileg m ri xfxa xifxhf xlfxnixt
yfya yifyhf ylfyniyt] - plot a graph
suppress axes, bold, plotting characters,
disconnected, suppress frame, File containing x
vector, suppress grid, mark points, region, x
origin, suppress x-axis label, x interval, x high
bound, x low bound, number of ticks on x -axis,
suppress x-axis title, y origin, suppress y-axis
label, y interval, y high bound, y low bound,
number of ticks on y -axis, suppress y-axis title
title
[-b c lstringvstringustring ] - title a vector or
a GPS
Printed 4/6/89 4
STAT(1G) COMMAND REFERENCE STAT(1G)
title bold, retain case, lower title, upper title,
vector title
Generators:
gas [-ci if ni sf tf] - generate additive sequence
interval, number, start, terminate
prime
[-ci hi li ni] - generate prime numbers
high, low, number
rand [-ci hf lf mf ni si] - generate random sequence
high, low, multiplier, number, seed
Restrictions
Some nodes have a limit on the size of the input vector.
SEE ALSO
graphics(1g) and gps(5g) in the UNIXr System Programmer
Reference Manual.
Printed 4/6/89 5
%%index%%
na:264,110;
sy:374,123;
de:497,2018;2851,2527;5714,3292;9342,4708;14386,1162;
se:15548,294;
%%index%%000000000125