Reshape or coerce an array of responses

Description

Reshape or coerce an array of responses.

Usage

1
array_Grid(X, Y, dropCol = TRUE)

Arguments

X

An object with class "GriData" or that can be coerced to this class.

Y

A vector of length n or a matrix with n rows where n is the number of nodes in X. In the first case, Y is coerced into a matrix with one column.

dropCol

Logical. When Y is a vector and dropCol is TRUE, the dimension of the array is nlevels(X), else it is c(nlevels(X), 1).

Value

An array with dimension c(nlevels(X), ncol(Y)) or nlevels(X) containing the elements of Y in correspondence with the levels of X.

See Also

apply_Grid to compute a vector of response for a given function.

Examples

1
2
3
myGD <- Grid(nlevels = c(20, 25))
F <- apply_Grid(myGD, branin)
aF <- array_Grid(X = myGD, Y = F)