This function creates a grid, where x are the row-names, y are the column names and the grid-values are the function values at (x,y).

par_grid(x, y, func, ...)

Arguments

x

vector of x-values

y

vector of y-values

func

function to create grid values

...

optional: arguments of func

Value

length(x) x length(y) - matrix with function values evaluated at (x,y)

Examples

par_grid(seq(0, 1, 10), seq(0, 1, 11), sum)
#> [,1] #> [1,] 0