Multidimensional pad for arrays of arbitrary dimension
Usage
apad(a, l, e = NULL, method = "ext", post = TRUE)
Arguments
a
Array to be padded
l
Amount of padding to add. If a vector, it is interpreted as
the extra extent of a along each of its dimensions (standard
recycling is used). If a scalar, interpret as the dimension to be
padded, in which case the amount is given
e
If l is a scalar, amount of padding to add to
dimension l.
method
String, with three possibilities: ext,
mirror, and rep.
The first, ext, uses a padding value given by the
nearest element of a, as measured by the Manhattan
post
Boolean, with default TRUE meaning to append to
a and FALSE meaning to prepend.