dimtags: Get and set dimtags for a tagged array

View source: R/tagged.array.R

dimtagsR Documentation

Get and set dimtags for a tagged array

Description

Dimtags are designed to make working with high-dimensional arrays simpler by providing names for each dimension. We use the word "tags" instead of names for two reasons

  1. To avoid confusion with dimnames which already exists and means something different

  2. Because more than dimension can have the same tag. So tags do not uniquely identify each dimension

This infrastructure was put in place to support objects of class mcarray, which are tagged arrays with some additional attributes. The primary use of tagging is to simplify the manipulation of high-dimensional arrays using the collapse function instead of apply.

Usage

dimtags(x)
dimtags(x) <- value

Arguments

x

A matrix, array, or any object with a dim attribute

value

A character vector of tags, which must match the number of dimensions

Value

A character vector of dimtags. The replacement function returns the modified array.

See Also

collapse, mcarray.object,


rjags documentation built on Nov. 21, 2026, 9:10 a.m.