Outer function | R Documentation |
The outer function.
Outer(x, y, oper = "*")
x |
A numerical vector. |
y |
A numerical vector. |
oper |
The available options are "*" (multiplication), "/" (division), "+" (sum), "-" (substraction), "^" (power raise), and " |
The function is the same as R's "outer", but works with vectors only and probably has less capabilities, but faster.
A matrix with all the combinations.
Manos Papadakis and Michail Tsagris
R implementation and documentation: Manos Papadakis <papadakm95@gmail.com> and Michail Tsagris <mtsagris@uoc.gr>.
mat.mult, vecdist
x <- rnorm(10)
y <- rnorm(10)
res<-Outer(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.