err_tdy_map_dim: Check and tidy 'map_dim'

Description Usage Arguments Details Value See Also Examples

View source: R/err_tdy.R

Description

Check and tidy map_dim, a mapping between the dimensions of arrays self and oth. If a dimension of self does not map on to a dimension of oth, then the corresponding element of map_dim is zero. oth can have dimensions that self does not map on to, so map_dim does not necessarily contain every number in seq_along(dim_oth).

Usage

1
err_tdy_map_dim(map_dim, n_dim_self, n_dim_oth)

Arguments

map_dim

A vector of non-negative integers, unique apart from any zeros, the same length as dim_self.

n_dim_self

The number of dimensions of self.

n_dim_oth

The number of dimensions of oth.

Details

self and oth are both assumed to have positive length, ie no dimensions with length 0.

Value

map_dim, coerced to integer.

See Also

err_tdy_map_pos, chk_map_dim

Examples

1
2
3
err_tdy_map_dim(map_dim = c(3, 1, 0),
                n_dim_self = 3L,
                n_dim_oth = 4L)

johnrbryant/demcheck documentation built on Dec. 31, 2021, 11:57 a.m.