Similar idea, using apply
apply(expand.grid(seq(ncol(V1)), seq(ncol(V2))), 1, function(i) {
c(V1[,i[1]], V2[,i[2]])})
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14]
#> [1,] 1 1 1 1 1 1 2 2 2 3 1 1 1 1
#> [2,] 2 2 2 3 3 4 3 3 4 4 2 2 2 3
#> [3,] 3 4 5 4 5 5 4 5 5 5 3 4 5 4
#> [4,] 6 6 6 6 6 6 6 6 6 6 6 6 6 6
#> [5,] 7 7 7 7 7 7 7 7 7 7 8 8 8 8
#> [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26]
#> [1,] 1 1 2 2 2 3 1 1 1 1 1 1
#> [2,] 3 4 3 3 4 4 2 2 2 3 3 4
#> [3,] 5 5 4 5 5 5 3 4 5 4 5 5
#> [4,] 6 6 6 6 6 6 6 6 6 6 6 6
#> [5,] 8 8 8 8 8 8 9 9 9 9 9 9
#> [,27] [,28] [,29] [,30] [,31] [,32] [,33] [,34] [,35] [,36] [,37] [,38]
#> [1,] 2 2 2 3 1 1 1 1 1 1 2 2
#> [2,] 3 3 4 4 2 2 2 3 3 4 3 3
#> [3,] 4 5 5 5 3 4 5 4 5 5 4 5
#> [4,] 6 6 6 6 6 6 6 6 6 6 6 6
#> [5,] 9 9 9 9 10 10 10 10 10 10 10 10
#> [,39] [,40] [,41] [,42] [,43] [,44] [,45] [,46] [,47] [,48] [,49] [,50]
#> [1,] 2 3 1 1 1 1 1 1 2 2 2 3
#> [2,] 4 4 2 2 2 3 3 4 3 3 4 4
#> [3,] 5 5 3 4 5 4 5 5 4 5 5 5
#> [4,] 6 6 6 6 6 6 6 6 6 6 6 6
#> [5,] 10 10 11 11 11 11 11 11 11 11 11 11
#> [,51] [,52] [,53] [,54] [,55] [,56] [,57] [,58] [,59] [,60] [,61] [,62]
#> [1,] 1 1 1 1 1 1 2 2 2 3 1 1
#> [2,] 2 2 2 3 3 4 3 3 4 4 2 2
#> [3,] 3 4 5 4 5 5 4 5 5 5 3 4
#> [4,] 7 7 7 7 7 7 7 7 7 7 7 7
#> [5,] 8 8 8 8 8 8 8 8 8 8 9 9
#> [,63] [,64] [,65] [,66] [,67] [,68] [,69] [,70] [,71] [,72] [,73] [,74]
#> [1,] 1 1 1 1 2 2 2 3 1 1 1 1
#> [2,] 2 3 3 4 3 3 4 4 2 2 2 3
#> [3,] 5 4 5 5 4 5 5 5 3 4 5 4
#> [4,] 7 7 7 7 7 7 7 7 7 7 7 7
#> [5,] 9 9 9 9 9 9 9 9 10 10 10 10
#> [,75] [,76] [,77] [,78] [,79] [,80] [,81] [,82] [,83] [,84] [,85] [,86]
#> [1,] 1 1 2 2 2 3 1 1 1 1 1 1
#> [2,] 3 4 3 3 4 4 2 2 2 3 3 4
#> [3,] 5 5 4 5 5 5 3 4 5 4 5 5
#> [4,] 7 7 7 7 7 7 7 7 7 7 7 7
#> [5,] 10 10 10 10 10 10 11 11 11 11 11 11
#> [,87] [,88] [,89] [,90] [,91] [,92] [,93] [,94] [,95] [,96] [,97] [,98]
#> [1,] 2 2 2 3 1 1 1 1 1 1 2 2
#> [2,] 3 3 4 4 2 2 2 3 3 4 3 3
#> [3,] 4 5 5 5 3 4 5 4 5 5 4 5
#> [4,] 7 7 7 7 8 8 8 8 8 8 8 8
#> [5,] 11 11 11 11 9 9 9 9 9 9 9 9
#> [,99] [,100] [,101] [,102] [,103] [,104] [,105] [,106] [,107] [,108]
#> [1,] 2 3 1 1 1 1 1 1 2 2
#> [2,] 4 4 2 2 2 3 3 4 3 3
#> [3,] 5 5 3 4 5 4 5 5 4 5
#> [4,] 8 8 8 8 8 8 8 8 8 8
#> [5,] 9 9 10 10 10 10 10 10 10 10
#> [,109] [,110] [,111] [,112] [,113] [,114] [,115] [,116] [,117] [,118]
#> [1,] 2 3 1 1 1 1 1 1 2 2
#> [2,] 4 4 2 2 2 3 3 4 3 3
#> [3,] 5 5 3 4 5 4 5 5 4 5
#> [4,] 8 8 8 8 8 8 8 8 8 8
#> [5,] 10 10 11 11 11 11 11 11 11 11
#> [,119] [,120] [,121] [,122] [,123] [,124] [,125] [,126] [,127] [,128]
#> [1,] 2 3 1 1 1 1 1 1 2 2
#> [2,] 4 4 2 2 2 3 3 4 3 3
#> [3,] 5 5 3 4 5 4 5 5 4 5
#> [4,] 8 8 9 9 9 9 9 9 9 9
#> [5,] 11 11 10 10 10 10 10 10 10 10
#> [,129] [,130] [,131] [,132] [,133] [,134] [,135] [,136] [,137] [,138]
#> [1,] 2 3 1 1 1 1 1 1 2 2
#> [2,] 4 4 2 2 2 3 3 4 3 3
#> [3,] 5 5 3 4 5 4 5 5 4 5
#> [4,] 9 9 9 9 9 9 9 9 9 9
#> [5,] 10 10 11 11 11 11 11 11 11 11
#> [,139] [,140] [,141] [,142] [,143] [,144] [,145] [,146] [,147] [,148]
#> [1,] 2 3 1 1 1 1 1 1 2 2
#> [2,] 4 4 2 2 2 3 3 4 3 3
#> [3,] 5 5 3 4 5 4 5 5 4 5
#> [4,] 9 9 10 10 10 10 10 10 10 10
#> [5,] 11 11 11 11 11 11 11 11 11 11
#> [,149] [,150]
#> [1,] 2 3
#> [2,] 4 4
#> [3,] 5 5
#> [4,] 10 10
#> [5,] 11 11
Created on 2022-12-02 with reprex v2.0.2