outer {base} | R Documentation |
The outer product of the vectors x
and y
is the matrix
A
with elements
A[i, j] = FUN(x[i], y[j], ...)
.
FUN
must be a function which expects at least two arguments
and which operates elementwise on arrays.
This needs to be extended to taking arrays of arbitrary dimension for
x
and y
and returns an array of dimension
c(dim(x), dim(y))
.
outer(x, y, FUN = "*", ...)
x |
a vector. |
y |
a vector. |
FUN |
a function to use on the outer products, it may be a quoted string. |
... |
optional arguments to be passed to |
outer(1:5, 1:5, "+")