outerize: Outerize a Scalar Function

Description Usage Arguments Details Value Examples

Description

Create a function wrapper that outerizes the action of its argument FUN.

Usage

1
outerize(FUN, outerize.args)

Arguments

FUN

function to apply, found via match.fun

outerize.args

A character vector of arguments which should be outerized.

Details

outerize is just function that calls Vectorize recursively. Like Vectorize, it can not be used with primitive functions and the functions that have arguments named FUN, vectorize.args, SIMPLIFY, USE.NAMES.

Value

A function with the same arguments as FUN.

Examples

1
2
3
f <- function(x, y) x + y
f_outerized <- outerize(f, c("x", "y"))
f_outerized(c(1, 2), c(3, 4, 5))

fountainer/fountainr documentation built on May 16, 2019, 1:51 p.m.