Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Vectorize.funD

Vectorize a multidimensional Function


Description

Vectorize a d-dimensional (input) function, in the same way that base::Vectorize for 1-dimensional functions.

Usage

Vectorize.funD(fund, d, .apply = base::apply)

Arguments

fund

d-dimensional function to Vectorize

d

dimension of input arguments of fund

.apply

which vectorization to use (default is base::apply)

Value

a vectorized function (to be called on matrix argument, on each row)

Examples

f = function(x)x[1]+1; f(1:10); F = Vectorize.funD(f,1);
F(1:10); #F = Vectorize(f); F(1:10);

f2 = function(x)x[1]+x[2]; f2(1:10); F = Vectorize.funD(f2,2);
F(cbind(1:10,11:20)); #F = Vectorize(f); F(1:10);

DiceView

Methods for Visualization of Computer Experiments Design and Surrogate

v2.0-1
GPL-3
Authors
Yann Richet, Yves Deville, Clement Chevalier
Initial release
2020-11-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.