onetensor.RdCreates a tensor with all entries one.
one.tensor(d=NULL,dn=NULL)A tensor with dim d and all elements one
$$E_{i_1\ldots i_n}=1$$
one.tensor(c(a=3,b=3,c=3))
#> , , 1
#>
#> b
#> a [,1] [,2] [,3]
#> [1,] 1 1 1
#> [2,] 1 1 1
#> [3,] 1 1 1
#>
#> , , 2
#>
#> b
#> a [,1] [,2] [,3]
#> [1,] 1 1 1
#> [2,] 1 1 1
#> [3,] 1 1 1
#>
#> , , 3
#>
#> b
#> a [,1] [,2] [,3]
#> [1,] 1 1 1
#> [2,] 1 1 1
#> [3,] 1 1 1
#>
#> attr(,"class")
#> [1] "tensor"