Construct a lens that is a view of the data with a new set of dimensions. Both view and set check that the new dimensions match the number of elements of the data.
reshape_l(dims)
dims | a vector with the new dimensions |
---|
#> [,1] [,2] [,3] #> [1,] 1 4 7 #> [2,] 2 5 8 #> [3,] 3 6 9#> [1] 100 2 3 4 100 6 7 8 100