oapply: Outer apply

View source: R/oapply.r

oapplyR Documentation

Outer apply

Description

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.

Usage

oapply(X, Y, FUN, switch_order = FALSE, ...)

Arguments

X

first argument to FUN

Y

second argument to FUN

FUN

a function to apply. See mapply

switch_order

Switch the order of X and Y in expand.grid

...

other arguments to mapply

Value

same as mapply.

Author(s)

TszKin Julian Chan ctszkin@gmail.com

See Also

mapply

Examples

oapply(11:15,1:5,choose)
oapply(11:15,1:5,choose,switch_order=TRUE)

Jmisc documentation built on June 22, 2022, 9:09 a.m.

Related to oapply in Jmisc...