Description Usage Arguments Value Examples
Given a list of vector or arrays applie outer
consecutively.
1 |
... |
vectors or matrices |
retval |
character, whether to return a data frame ( |
responseName |
character scalar, when returning a data frame this will be the name of the variable containing cell values Given the list of vectors and/or arrays |
Depending on the value of retval
, an array or a data frame with the
outer product of elements supplied through ...
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # As an array
a <- mouter(
A = c(a=1, b=2) / 3,
M = matrix(1:4 / 10, 2, 2, dimnames=list(D=letters[5:6], E=letters[7:8])),
B = c(c=2, d=3) / 5,
retval="a"
)
str(a)
# Data frame
mouter(
A = c(a=1, b=2) / 3,
M = matrix(1:4 / 10, 2, 2, dimnames=list(D=letters[5:6], E=letters[7:8])),
B = c(c=2, d=3) / 5,
retval="df"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.