.BG
.VE $Header: /usr3/s/current/s/.help/RCS/outer,v 1.2 83/12/30 19:31:39 rab Exp $
.FN outer
.FN %o
.TL
outer %o: Generalized Outer Products
.CS
x %o y #operator form
outer(x, y, fun, arg1, arg2, ...) #general form
.PP
.AG x,y
first and second arguments to the function `fun'.
Missing values (NAs) are allowed if `fun' accepts them.
.AG fun
in the general form, the name of some S function.  This
function will be called repeatedly, for all the values of
the first subscript of `x' and the last subscript of `y'.
For example, if `x' and `y' are vectors, and `fun' returns a
single value when its two arguments are single values, the
result is a matrix of `len(x)' by `len(y)'.  In the operator
case, `fun' defaults to multiply (`*').
.AG argi
other arguments to `fun', if needed.
.RT
array, whose dimension vector is the concatenation of the
dimension vectors of `x' and `y'.
.EX
z <- x %o y   # z[i,j] equals x[i] * y[j]

z <- outer(x,y,"/") # z[i,j] equals x[i]/y[j]
.KW basic*
.KW algebra
.WR
