undim.rdundim returns its input with the dim attribute removed
undim(x)x without dim attribute
x <- matrix(1:12, 3)
x
#> [,1] [,2] [,3] [,4]
#> [1,] 1 4 7 10
#> [2,] 2 5 8 11
#> [3,] 3 6 9 12
undim(x)
#> [1] 1 2 3 4 5 6 7 8 9 10 11 12