myGD <- Grid(levels = list("X" = c(0, 1),
"Y" = c(0.0, 0.5, 1.0),
"Z" = c(0.0, 0.2, 0.4, 1.0)))
## gaussian function
apply_Grid(myGD, fun = function(x) exp(-x[1]^2 - 3 * x[2]^2 - 2 * x[3]^2))
Run the code above in your browser using DataLab