Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ stat(1G) — UNIX System III

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

graphics(1G)

gps(5)

STAT(1G)  —  UNIX 3.0

NAME

stat − statistical network useful with graphical commands

SYNOPSIS

node-name [options] [files]

DESCRIPTION

Stat is a collection of command level functions (nodes) that can be interconnected using sh(1) 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. 

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

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 synopses. 

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

siline [− ciifni sf ] − generate a line given slope and intercept
intercept, number of positive integers, slope

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

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 − sum total

var − variance

Translators:

bar [− a b f g riwixf xa yfya ylf yhf ] − build a bar chart
suppress axes, bold, suppress f rame, suppress grid, region, w idth in percent, x origin, suppress x-a xis label, y origin, suppress y-a xis label, y-axis lower bound, y -axis high bound

hist [− a b f g rixf xa yfya ylf yhf ] − build a histogram
suppress axes, bold, suppress f rame, suppress grid, region, x origin, suppress x-a xis label, y origin, suppress y-a xis label, y-axis lower bound, y -axis high bound

label [− b c Ffile h p r i 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 percentage(:=100), value as 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 (don’t 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 c haracters, disconnected, suppress frame, F ile containing x vector, suppress g rid, mark points, region, x origin, suppress x -axis label, x interval, x h igh bound, x low bound, number of ticks on x -axis, suppress x-axis t itle, y origin, suppress y -axis label, y interval, y h igh bound, y low bound, number of ticks on y -axis, suppress y-axis title

title [− b c lstringvstringustring ] − title a vector or a GPS
title bold, retain case, l ower 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), gps(5). 

May 16, 1980

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026