expected <- eval(parse(text="structure(c(4, 8, 12, 8, 16, 24, 12, 24, 36, 16, 20, 24, 32, 40, 48, 48, 60, 72, 28, 32, 36, 56, 64, 72, 84, 96, 108, 40, 44, 48, 80, 88, 96, 120, 132, 144, 16, 32, 48, 20, 40, 60, 24, 48, 72, 64, 80, 96, 80, 100, 120, 96, 120, 144, 112, 128, 144, 140, 160, 180, 168, 192, 216, 160, 176, 192, 200, 220, 240, 240, 264, 288, 28, 56, 84, 32, 64, 96, 36, 72, 108, 112, 140, 168, 128, 160, 192, 144, 180, 216, 196, 224, 252, 224, 256, 288, 252, 288, 324, 280, 308, 336, 320, 352, 384, 360, 396, 432, 40, 80, 120, 44, 88, 132, 48, 96, 144, 160, 200, 240, 176, 220, 264, 192, 240, 288, 280, 320, 360, 308, 352, 396, 336, 384, 432, 400, 440, 480, 440, 484, 528, 480, 528, 576, 52, 56, 60, 104, 112, 120, 156, 168, 180, 64, 68, 72, 128, 136, 144, 192, 204, 216, 76, 80, 84, 152, 160, 168, 228, 240, 252, 88, 92, 96, 176, 184, 192, 264, 276, 288, 208, 224, 240, 260, 280, 300, 312, 336, 360, 256, 272, 288, 320, 340, 360, 384, 408, 432, 304, 320, 336, 380, 400, 420, 456, 480, 504, 352, 368, 384, 440, 460, 480, 528, 552, 576, 364, 392, 420, 416, 448, 480, 468, 504, 540, 448, 476, 504, 512, 544, 576, 576, 612, 648, 532, 560, 588, 608, 640, 672, 684, 720, 756, 616, 644, 672, 704, 736, 768, 792, 828, 864, 520, 560, 600, 572, 616, 660, 624, 672, 720, 640, 680, 720, 704, 748, 792, 768, 816, 864, 760, 800, 840, 836, 880, 924, 912, 960, 1008, 880, 920, 960, 968, 1012, 1056, 1056, 1104, 1152, 4000, 8000, 12000, 8000, 16000, 24000, 12000, 24000, 36000, 16000, 20000, 24000, 32000, 40000, 48000, 48000, 60000, 72000, 28000, 32000, 36000, 56000, 64000, 72000, 84000, 96000, 108000, 40000, 44000, 48000, 80000, 88000, 96000, 120000, 132000, 144000, 16000, 32000, 48000, 20000, 40000, 60000, 24000, 48000, 72000, 64000, 80000, 96000, 80000, 1e+05, 120000, 96000, 120000, 144000, 112000, 128000, 144000, 140000, 160000, 180000, 168000, 192000, 216000, 160000, 176000, 192000, 2e+05, 220000, 240000, 240000, 264000, 288000, 28000, 56000, 84000, 32000, 64000, 96000, 36000, 72000, 108000, 112000, 140000, 168000, 128000, 160000, 192000, 144000, 180000, 216000, 196000, 224000, 252000, 224000, 256000, 288000, 252000, 288000, 324000, 280000, 308000, 336000, 320000, 352000, 384000, 360000, 396000, 432000, 40000, 80000, 120000, 44000, 88000, 132000, 48000, 96000, 144000, 160000, 2e+05, 240000, 176000, 220000, 264000, 192000, 240000, 288000, 280000, 320000, 360000, 308000, 352000, 396000, 336000, 384000, 432000, 4e+05, 440000, 480000, 440000, 484000, 528000, 480000, 528000, 576000, 52000, 56000, 60000, 104000, 112000, 120000, 156000, 168000, 180000, 64000, 68000, 72000, 128000, 136000, 144000, 192000, 204000, 216000, 76000, 80000, 84000, 152000, 160000, 168000, 228000, 240000, 252000, 88000, 92000, 96000, 176000, 184000, 192000, 264000, 276000, 288000, 208000, 224000, 240000, 260000, 280000, 3e+05, 312000, 336000, 360000, 256000, 272000, 288000, 320000, 340000, 360000, 384000, 408000, 432000, 304000, 320000, 336000, 380000, 4e+05, 420000, 456000, 480000, 504000, 352000, 368000, 384000, 440000, 460000, 480000, 528000, 552000, 576000, 364000, 392000, 420000, 416000, 448000, 480000, 468000, 504000, 540000, 448000, 476000, 504000, 512000, 544000, 576000, 576000, 612000, 648000, 532000, 560000, 588000, 608000, 640000, 672000, 684000, 720000, 756000, 616000, 644000, 672000, 704000, 736000, 768000, 792000, 828000, 864000, 520000, 560000, 6e+05, 572000, 616000, 660000, 624000, 672000, 720000, 640000, 680000, 720000, 704000, 748000, 792000, 768000, 816000, 864000, 760000, 8e+05, 840000, 836000, 880000, 924000, 912000, 960000, 1008000, 880000, 920000, 960000, 968000, 1012000, 1056000, 1056000, 1104000, 1152000), .Dim = c(3L, 3L, 4L, 4L, 2L, 2L), .Dimnames = list(NULL, c(\"A\", \"B\", \"C\"), NULL, c(\"D\", \"E\", \"F\", \"G\"), c(\"happy\", \"sad\"), c(\"frequentist\", \"bayesian\")))"));   
test(id=0, code={   
argv <- eval(parse(text="list(structure(c(4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 4000, 8000, 12000, 16000, 20000, 24000, 28000, 32000, 36000, 40000, 44000, 48000, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 8000, 16000, 24000, 32000, 40000, 48000, 56000, 64000, 72000, 80000, 88000, 96000, 12, 24, 36, 48, 60, 72, 84, 96, 108, 120, 132, 144, 12000, 24000, 36000, 48000, 60000, 72000, 84000, 96000, 108000, 120000, 132000, 144000, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 16000, 32000, 48000, 64000, 80000, 96000, 112000, 128000, 144000, 160000, 176000, 192000, 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 20000, 40000, 60000, 80000, 1e+05, 120000, 140000, 160000, 180000, 2e+05, 220000, 240000, 24, 48, 72, 96, 120, 144, 168, 192, 216, 240, 264, 288, 24000, 48000, 72000, 96000, 120000, 144000, 168000, 192000, 216000, 240000, 264000, 288000, 28, 56, 84, 112, 140, 168, 196, 224, 252, 280, 308, 336, 28000, 56000, 84000, 112000, 140000, 168000, 196000, 224000, 252000, 280000, 308000, 336000, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 32000, 64000, 96000, 128000, 160000, 192000, 224000, 256000, 288000, 320000, 352000, 384000, 36, 72, 108, 144, 180, 216, 252, 288, 324, 360, 396, 432, 36000, 72000, 108000, 144000, 180000, 216000, 252000, 288000, 324000, 360000, 396000, 432000, 40, 80, 120, 160, 200, 240, 280, 320, 360, 400, 440, 480, 40000, 80000, 120000, 160000, 2e+05, 240000, 280000, 320000, 360000, 4e+05, 440000, 480000, 44, 88, 132, 176, 220, 264, 308, 352, 396, 440, 484, 528, 44000, 88000, 132000, 176000, 220000, 264000, 308000, 352000, 396000, 440000, 484000, 528000, 48, 96, 144, 192, 240, 288, 336, 384, 432, 480, 528, 576, 48000, 96000, 144000, 192000, 240000, 288000, 336000, 384000, 432000, 480000, 528000, 576000, 52, 104, 156, 208, 260, 312, 364, 416, 468, 520, 572, 624, 52000, 104000, 156000, 208000, 260000, 312000, 364000, 416000, 468000, 520000, 572000, 624000, 56, 112, 168, 224, 280, 336, 392, 448, 504, 560, 616, 672, 56000, 112000, 168000, 224000, 280000, 336000, 392000, 448000, 504000, 560000, 616000, 672000, 60, 120, 180, 240, 300, 360, 420, 480, 540, 600, 660, 720, 60000, 120000, 180000, 240000, 3e+05, 360000, 420000, 480000, 540000, 6e+05, 660000, 720000, 64, 128, 192, 256, 320, 384, 448, 512, 576, 640, 704, 768, 64000, 128000, 192000, 256000, 320000, 384000, 448000, 512000, 576000, 640000, 704000, 768000, 68, 136, 204, 272, 340, 408, 476, 544, 612, 680, 748, 816, 68000, 136000, 204000, 272000, 340000, 408000, 476000, 544000, 612000, 680000, 748000, 816000, 72, 144, 216, 288, 360, 432, 504, 576, 648, 720, 792, 864, 72000, 144000, 216000, 288000, 360000, 432000, 504000, 576000, 648000, 720000, 792000, 864000, 76, 152, 228, 304, 380, 456, 532, 608, 684, 760, 836, 912, 76000, 152000, 228000, 304000, 380000, 456000, 532000, 608000, 684000, 760000, 836000, 912000, 80, 160, 240, 320, 400, 480, 560, 640, 720, 800, 880, 960, 80000, 160000, 240000, 320000, 4e+05, 480000, 560000, 640000, 720000, 8e+05, 880000, 960000, 84, 168, 252, 336, 420, 504, 588, 672, 756, 840, 924, 1008, 84000, 168000, 252000, 336000, 420000, 504000, 588000, 672000, 756000, 840000, 924000, 1008000, 88, 176, 264, 352, 440, 528, 616, 704, 792, 880, 968, 1056, 88000, 176000, 264000, 352000, 440000, 528000, 616000, 704000, 792000, 880000, 968000, 1056000, 92, 184, 276, 368, 460, 552, 644, 736, 828, 920, 1012, 1104, 92000, 184000, 276000, 368000, 460000, 552000, 644000, 736000, 828000, 920000, 1012000, 1104000, 96, 192, 288, 384, 480, 576, 672, 768, 864, 960, 1056, 1152, 96000, 192000, 288000, 384000, 480000, 576000, 672000, 768000, 864000, 960000, 1056000, 1152000), .Dim = c(3L, 4L, 2L, 3L, 4L, 2L), .Dimnames = list(c(\"A\", \"B\", \"C\"), c(\"D\", \"E\", \"F\", \"G\"), c(\"frequentist\", \"bayesian\"), NULL, NULL, c(\"happy\", \"sad\"))), c(4L, 1L, 5L, 2L, 6L, 3L), TRUE)"));   
.Internal(`aperm`(argv[[1]], argv[[2]], argv[[3]]));   
}, o=expected);   

