makeFunctionOuter: Makes a vectorized 2-ary function into one that returns a...

makeFunctionOuterR Documentation

Makes a vectorized 2-ary function into one that returns a matrix

Description

A vectorized function of two arguments is made returning the result for each pair structured as a matrix, or if it already returns an n-ary array, as an n+1-ary array with the last dimension splitted

Usage

makeFunctionOuter(f)

Arguments

f

the 2-ary working on vectors, lists or rows of matrices or datasets

Value

a function like f but returning the result for each pair of input structured with one more dimension.

Examples

makeFunctionOuter(\(x,y) exp(-abs(x-y)))(1:4,1:4)


DistributionalDDA documentation built on Oct. 20, 2026, 5:06 p.m.