组合两个二维阵列以产生三维阵列

时间:2016-01-03 15:56:24

标签: arrays r

考虑数组SELECT * FROM foo1, foo2, foo3, foo4, foo5 WHERE ( foo1.id OR foo2.id OR foo3.id OR foo4.id OR foo5.id ) = ? x

y

如何将它们组合起来生成x <- structure(1:4, .Dim = c(2L, 2L), .Dimnames = structure(list(A = c("a", "b"), B = c("c", "d")), .Names = c("A", "B"))) y <- structure(5:8, .Dim = c(2L, 2L), .Dimnames = structure(list(A = c("a", "b"), B = c("c", "d")), .Names = c("A", "B"))) > x B A c d a 1 3 b 2 4 > y B A c d a 5 7 b 6 8

z

这看起来是一个相当常见的操作,但我还没有找到一个功能 这样做。

0 个答案:

没有答案