Contents - Index


INNER PRODUCTS

COLS - Syntax: col(<mat>,<column list>).  Extracts specified rows from <mat> into new dataset.  <column list> is a series of row numbers. Example:

firsttwo = col(davis,1 2)

DIAG - Syntax: diag(<vecmat>). Converst a column vector into a diagonal matrix.  If a dataset with more than one column is provided as input, it uses the first column. Example:

newsquare = diag(campnet)

TOTAL - Syntax: tot(<mat1>,[R½C½L] [R½C½L])Adds values of  <mat1>, with optional breakout by one or two dimensions.  Examples:

rowsums = tot(davis rows)
colsums = total(davis cols)
nties = tot(davis)
allrels = tot(newcomb rows cols)
 
The last example totals all matrices contained in the newcomb dataset to get a single matrix.  In other work, it takes a 3-dimensional table (rows, columns and matrices) and aggregates across matrices to obtain a table with just rows and columns.

TRANSPOSE - Syntax: transp(<mat> [<dim><dim>]).  Exchanges any two dimensions of a dataset.  If no dimensions are given, rows and columns are assumed.  Examples:
 
tdavis = transp(davis)
cent2 = transp(cent cols levs)

WAVERAGE - Syntax: wavg(<mat1>,[R½C½L] [R½C½L]). Average values of <mat1>, with optional breakout by one or two dimensions.  Examples:
   
rowmeans = wavg(davis rows)
colmeans = wavg(davis cols)
density = wavg(davis)
avgtie = wavg(newcomb rows cols)

The last example totals all matrices contained in the newcomb dataset to get a single matrix.  In other words, it takes a 3-dimensional table (rows, columns and matrices) and aggregates across matrices to obtain a table with just rows and columns.

WMAXIMUM - Syntax: wmax(<mat1> [r½c½1] [r½c½1])Takes the largest value of within a dataset, optionally broken out by one or more dimensions.  Example:
 
rowmax = wmax(ron1 rows)
matmax = wmax(krack lev)

WMINIMUM - Syntax: wmin(<mat1> [r½c½1] [r½c½1])Takes the smallest value of within a dataset, optionally broken out by one or more dimensions.  Example:

rowmin = wmin(ron1 rows)
matmin = wmin(krack lev)


FURTHER INFORMATION

Uniary Operations

Binary operations

Procedures

Matrix Algebra