apply2d {emdbook} | R Documentation |
applies a (non-vectorized) function to a combination of vectors;
substitute for outer
apply2d(fun, x, y, ...)
fun |
a function of two arguments (or a character string such as "*" ) |
x |
first vector |
y |
second vector |
... |
additional arguments to fun |
a matrix of the function applied to the combinations of the vector values
Ben Bolker
outer
outer(1:3,1:3) ## this example would work with outer() too apply2d("*",1:3,1:3)