Get the dimension implied by a set of arrays as used in implicit expansion.

expandedDim(..., arrays = list(), allowRecycling = FALSE)

Arguments

...

Objects that are coerced to arrays.

arrays

A list of objects that are coerced to arrays.

allowRecycling

Whether to allow recycling of elements in each dimension.

Value

A numberical vector containing the expanded dimension implied by the arrays.

Details

Both the arrays in ... and arrays are considered by concatenating them with c(list(...), arrays). Throws an error if the arrays are not compatible.

See also

Examples

x <- 1:3
y <- t(4:5)
z <- array(0, c(1,1,6))
expandedDim(x, y, z)
#> [1] 3 2 6