TITLE(outer @@ Outer Product of Vectors)
USAGE(
outer(x, y, FUN = "*", DOTS)
)
ALIAS(outer)
ARGUMENTS(
ARG(x @@ a vector.)
ARG(y @@ a vector.)
ARG(FUN @@ a function to use on the outer products, it may be a quoted string.)
ARG(DOTS @@ optional arguments to be passed to LANG(fun).)
)
DESCRIPTION(
The outer product of the vectors LANG(x) and LANG(y) is the matrix
LANG(A) with elements
LANG(A[i, j] = FUN(x[i], y[j], DOTS)).
LANG(FUN) must be a function which expects at least two arguments
and which operates elementwise on arrays.
PARA
This needs to be extended to taking arrays of arbitrary dimension for
LANG(x) and LANG(y) and returns an array of dimension
LANG(c(dim(x), dim(y))).
)
EXAMPLES(
outer(1:5, 1:5, "+")
)
