Swaps the matrix list with a cube
Examples
# Create matrix list
matLst <- cvPost(10, lotri::lotri(a+b~c(1, 0.25, 1)), 3)
print(matLst)
#> [[1]]
#> a b
#> a 1.40542142 -0.08608545
#> b -0.08608545 0.64849599
#>
#> [[2]]
#> a b
#> a 1.9873212 0.3223787
#> b 0.3223787 0.8616822
#>
#> [[3]]
#> a b
#> a 1.7777167 0.3925689
#> b 0.3925689 1.0243472
#>
# Convert to cube
matCube <- swapMatListWithCube(matLst)
print(matCube)
#> , , 1
#>
#> a b
#> a 1.40542142 -0.08608545
#> b -0.08608545 0.64849599
#>
#> , , 2
#>
#> a b
#> a 1.9873212 0.3223787
#> b 0.3223787 0.8616822
#>
#> , , 3
#>
#> a b
#> a 1.7777167 0.3925689
#> b 0.3925689 1.0243472
#>
# Convert back to list
matLst2 <- swapMatListWithCube(matCube)
print(matLst2)
#> [[1]]
#> a b
#> a 1.40542142 -0.08608545
#> b -0.08608545 0.64849599
#>
#> [[2]]
#> a b
#> a 1.9873212 0.3223787
#> b 0.3223787 0.8616822
#>
#> [[3]]
#> a b
#> a 1.7777167 0.3925689
#> b 0.3925689 1.0243472
#>
