Inserts an axis of size 1 at the specified position.
Arguments
- x
(
arrayish)
One input. Can be any data type. An R value materializes at its default data type.- axis
(
integer(1))
Position at which to insert the new axis. Valid positions range from 1 tonaxes(x) + 1. Negative values count from the end of the result, i.e.-1appends the new axis at the end.
Value
(arrayish)
Has x's data type, with an extra axis of size 1 in its shape.