Learn R Programming

term (version 0.1.0)

npdims: Number of Parameter Dimensions

Description

Gets the number of parameter dimensions of an object as returned by pdims().

Usage

npdims(x, ...)

# S3 method for term npdims(x, terms = FALSE, ...)

Arguments

x

The object.

...

Unused.

terms

A flag specifying whether to get the number of dimensions for each term element.

Value

A named integer vector of the number of dimensions of each parameter.

Methods (by class)

  • term: Number of parameter dimensions of term vector

See Also

pdims() and term-vector()

Examples

Run this code
# NOT RUN {
npdims(as.term(c("alpha[1]", "alpha[3]", "beta[1,1]", "beta[2,1]")))
npdims(as.term(c("alpha[1]", "alpha[3]", "beta[1,1]", "beta[2,1]")), terms = TRUE)
# }

Run the code above in your browser using DataLab