X
and Y
must be suitable arguments for FUN
. Each
will be extended by rep
to length the products of the
lengths of X
and Y
before FUN
is called. FUN
is called with these two extended vectors as arguments
(plus any arguments in ...
). It must be a vectorized
function (or the name of one) expecting at least two arguments and
returning a value with the same length as the first (and the second).
Where they exist, the [dim]names of X
and Y
will be
copied to the answer, and a dimension assigned which is the
concatenation of the dimensions of X
and Y
(or lengths
if dimensions do not exist).
FUN = "*"
is handled as a special case via
as.vector(X) %*% t(as.vector(Y))
, and is intended only for
numeric vectors and arrays.
%o%
is binary operator providing a wrapper for
outer(x, y, "*")
.