次のデータ フレーム メソッドが必要ですcbind()
。
A <- B <- data.frame(matrix(runif(100), ncol = 10))
names(A) <- LETTERS[1:10]
names(B) <- LETTERS[11:20]
AB <- cbind(A, B)
> head(AB)
A B C D E F G
1 0.7712438 0.8812705 0.84882438 0.75724291 0.921585941 0.5164942 0.18571224
2 0.0126251 0.1615442 0.60085004 0.05875528 0.253768847 0.2113731 0.87980683
3 0.3084463 0.2632898 0.78474323 0.79381024 0.090883591 0.2370151 0.73951553
4 0.3569714 0.9129827 0.31129223 0.75632920 0.866286356 0.2824447 0.96211833
5 0.8217136 0.9586726 0.87056708 0.93756202 0.001114461 0.5061194 0.06171122
6 0.5402234 0.4114434 0.05434122 0.40361466 0.536001187 0.4158735 0.99494631
H I J K L M N
1 0.40434088 0.7099546 0.9936925 0.7712438 0.8812705 0.84882438 0.75724291
2 0.20439643 0.2077438 0.5143336 0.0126251 0.1615442 0.60085004 0.05875528
3 0.83729465 0.1859405 0.7801276 0.3084463 0.2632898 0.78474323 0.79381024
4 0.06617131 0.7731577 0.1581497 0.3569714 0.9129827 0.31129223 0.75632920
5 0.58580980 0.4463787 0.1484671 0.8217136 0.9586726 0.87056708 0.93756202
6 0.30236632 0.3962285 0.8330804 0.5402234 0.4114434 0.05434122 0.40361466
O P Q R S T
1 0.921585941 0.5164942 0.18571224 0.40434088 0.7099546 0.9936925
2 0.253768847 0.2113731 0.87980683 0.20439643 0.2077438 0.5143336
3 0.090883591 0.2370151 0.73951553 0.83729465 0.1859405 0.7801276
4 0.866286356 0.2824447 0.96211833 0.06617131 0.7731577 0.1581497
5 0.001114461 0.5061194 0.06171122 0.58580980 0.4463787 0.1484671
6 0.536001187 0.4158735 0.99494631 0.30236632 0.3962285 0.8330804