R/dimensions.R

"dimensions" <-
function(node)
#   Get dimension information for quantity in OpenBUGS model
{
    nodeLabel <- as.character(node)
    if(!(nodeLabel %in% modelNames()))
        stop("node must be a variable name from the model")
    dimensions <- .OpenBUGS(c("BugsRobjects.SetVariable", "BugsRobjects.GetNumDimensions"),
                            c("CharArray", "Integer"),
                            list(nodeLabel, NA))[[2]]
    dimensions
}

Try the BRugs package in your browser

Any scripts or data that you put into this service are public.

BRugs documentation built on May 31, 2023, 7:19 p.m.