A dimension of length 1 is added a given position to a tensor
undrop.tensor(A,name,pos=1)
A tensor with one extra dimension of length 1 with name name at position pos.
name
pos
the tensor
the name of the dimension to be added
the position, where to insert the new dimension
K. Gerald van den Boogaart
The function is a pure convenience function.
A <- to.tensor(1:4,c(a=2,b=2)) undrop.tensor(A,"i")
Run the code above in your browser using DataLab