outer2 | R Documentation |
The outer product of the arrays X
, Y
, ... with dimensions
c(dim(X), dim(Y), ...)
; see outer
.
outer2(..., FUN)
... |
arguments passed to |
FUN |
a function to use on the outer products |
outer
; Vectorize
outer2(LETTERS[1:3], letters[1:3], LETTERS[24:26], FUN = paste0)
outer2(1:3, 1:3, 1:2, FUN = prod)
## three-way example in ?outer
x <- setNames(1:9, 1:9); y <- setNames(2:8, paste0(2:8, ':'))
x %o% x %o% y[1:3]
outer2(x, x, y[1:3], FUN = prod)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.