https://cran.r-project.org/web/packages/tensor/tensor.pdf
