Gets the dimensions of an object.

# S3 method for term
dims(x, ...)

Arguments

x

An object.

...

Other arguments passed to methods.

Value

An integer vector of the dimensions.

Details

Unlike base::dim(), dims returns the length of an atomic vector.

See also

base::dim()

Other dimensions: ndims(), npdims(), pdims()

Examples


dims(term("beta[1,1]"))
#> [1] 1
dims(term("beta[1,1]", "beta[1,2]"))
#> [1] 2