abind: Bind comformable arrays

Description Usage Arguments Details Value Author(s) See Also

Description

abind binds two conformable arrays along a dimension.

Usage

1
abind(arr1, arr2, d, facename = "")

Arguments

arr1

first array

arr2

second array

d

dimension along which arr1 and arr2 are joined, or, if the length(dim(arr1)) == length(dim(arr2)) + 1 the dimension in arr1 that is extended by arr2.

facename

Name for the new array dimension

Details

dim( arr1 ) and dim( arr2 ) must be equal except in the dth dimension. If the length of dim( arr2 ) is 1 less than that of dim( arr1 ), then 'arr2' is treated as if it had dropped the dth dimension with size 1.

If length(dim(arr2)) == length(dim(arr1)) - 1, then arr2 is treated as if it dropped a dimension of size 1 in the dth dimension. 'facename' is used as the name of the dimnames list for this dimension.

Value

The returned value, ret, is an array with dimension dim(arr1) except for the dth dimension where dim(ret)[d] == dim(arr1)[d] + dim(arr2)[d].

Author(s)

Georges Monette

See Also

aperm, to permute arrays


gmonette/WWCa documentation built on May 17, 2019, 7:25 a.m.