Description Usage Arguments Details Value See Also Examples
View source: R/expandFunctions.R
Extends outer {base} outer(x,y,FUN)
to include functions
FUN(x,y,...)
where the first argument of FUN
is a vector but the second argument must be a scalar.
1 |
x |
Vector, with the same function as in outer {base}. Each value will correspond to a row in the return matrix. |
y |
Vector. Each element in the vector corresponds to a column in the return matrix. |
FUN |
Function. x and y will
be the first and second arguments. Unlike
|
... |
Additional parameters for FUN. |
outer has limitations; it only works with functions which
can take vector inputs for both
the first and second arguments, such as "^". As a result,
many functions cannot be used for FUN. The function eOuter
gets around this limitation by additionally allowing functions
which accept a vector for the first argument, but only scalars
for the second argument. It can be used everywhere
that outer
can be used, but also when FUN is
limited in this way.
A matrix Z
of size
length(x) X length(y)
containing Z[,i]
with values FUN(x,y[i],...)
.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.