Add 1 dimension to array

add_array_dim(a, d)

Arguments

a

array object

d

dimension to add (<= length(dim(a))+1)

Value

array

Examples

x <- matrix(1:6, 3, 2) add_array_dim(a, 1)
#> Error in add_array_dim(a, 1): object 'a' not found