array_Grid: Reshape or coerce an array of responses

Description Usage Arguments Value See Also Examples

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)


smint documentation built on April 14, 2017, 1:49 p.m.
Search within the smint package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.