Make an array of ones
ones(...)
... | A sequence of dimensions separated by commas |
---|
An integer array of ones
ones(5)#> [1] 1 1 1 1 1ones(5, 1)#> [,1] #> [1,] 1 #> [2,] 1 #> [3,] 1 #> [4,] 1 #> [5,] 1ones(1, 5)#> [,1] [,2] [,3] [,4] [,5] #> [1,] 1 1 1 1 1ones(2, 3)#> [,1] [,2] [,3] #> [1,] 1 1 1 #> [2,] 1 1 1ones(2, 3, 2)#> , , 1 #> #> [,1] [,2] [,3] #> [1,] 1 1 1 #> [2,] 1 1 1 #> #> , , 2 #> #> [,1] [,2] [,3] #> [1,] 1 1 1 #> [2,] 1 1 1 #>#> int [1:5(1d)] 1 1 1 1 1