The delta tensor is the tensor equivalent of the identity.
delta.tensor(d,mark="'",dn=NULL,by=NULL)
the row dimensions
a character to be concatenated to the names of the row dimensions to get the column dimension names
dimnames for the result
the dimensions which should not be duplicated
a tensor with dimension c(d,mark(d,mark))
c(d,mark(d,mark))
$$E_{i_1\ldots i_n j_1\ldots j_n}=\delta_{i_1j_1}\ldots\delta_{i_nj_n}$$
to.tensor
# NOT RUN { delta.tensor(c(a=2,b=3)) # }
Run the code above in your browser using DataLab