powered by
Outer apply It use the expand.grid to compute all possible combination of X and Y, then call the mapply with the combination generated and FUN.
X
Y
FUN
oapply(X, Y, FUN, switch_order = FALSE, ...)
first argument to FUN
second argument to FUN
a function to apply. See mapply
Switch the order of X and Y in expand.grid
other arguments to mapply
same as mapply.
mapply
# NOT RUN { oapply(11:15,1:5,choose) oapply(11:15,1:5,choose,switch_order=TRUE) # }
Run the code above in your browser using DataLab