Description Usage Arguments Details Value See Also Examples
Check and tidy map_pos
, a mapping between
positions along dimensions of array self
and
positions along dimensions of array oth
.
map_pos
is a list the same length as
dim_self
. Each element of map_pos
is a vector, showing, for each position on the dimension
of self
, which postition on the dimension
of oth
it maps on to. Multiple positions
on self
can map on to the same position on oth
.
If a position on self
does not map to a position,
on oth
, the value for the non-mapping position
is 0
. If a dimension of self
does not have a corresponding dimension in
oth
, then corresponding element of map_dim
is vector of zeros.
1 | err_tdy_map_pos(map_pos, dim_self, dim_oth, map_dim)
|
map_pos |
A list of integer vectors. |
dim_self |
The dimensions of |
dim_oth |
The dimensions of |
map_dim |
A vector of non-negative integers. |
err_tdy_map_pos
assumes that map_dim
,
dim_self
, and dim_oth
are all valid.
self
and oth
are both assumed to have positive
length, ie no dimensions with length 0.
map_pos
, with elements coerced to integer.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | map_pos <- list(c(1L, 2L, 3L, 4L), c(0L, 1L), c(1L, 2L, 2L))
map_dim <- c(1L, 3L, 2L)
dim_self <- c(4L, 2L, 3L)
dim_oth <- c(4L, 2L, 1L)
err_tdy_map_pos(map_pos = map_pos,
map_dim = map_dim,
dim_self = dim_self,
dim_oth = dim_oth)
map_pos <- list(c(2L, 1L), c(1L, 1L), c(0L, 0L, 0L))
map_dim <- c(1L, 2L, 0L)
dim_self <- c(2L, 2L, 3L)
dim_oth <- c(2L, 1L)
err_tdy_map_pos(map_pos = map_pos,
map_dim = map_dim,
dim_self = dim_self,
dim_oth = dim_oth)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.