gridpmp <-
function(m,pin,n)
{
# build two grids (e.g. for intergration) over subspaces p and mp
# p can be supplies as a vector of indices
# e.g.: c(1,3). M is the total number of colons
# n is a tuple with number of rows
cX <- seq(m)
if (is.null(pin))
p <- list(p=NULL, mp=cX)
else
p <- list(p=pin, mp=cX[-pin])
#
p <- lapply(p, function(p) { p; names(p)=p; p} )
l <- lapply(p,length)
# grids
mpgrid = lapply(p, function(p)
expand.grid(sapply(p, function(x) seq(n[x]), USE.NAMES=TRUE, simplify=FALSE)))
mpgrid
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.