【发布时间】:2017-11-16 13:52:01
【问题描述】:
R> set.seed(123)
R> data <- matrix(rnorm(6),3,10)
R> colnames(data) <- c("s1","s2","s3","s4","s5","s6","s7","s8","s9","s10")
R> print(data)
sorry, I don't know how to show the print
我想通过 R 包从数据框中获取所有可能的列组合?时间越短越好
结果是这样的,
All possible two pair combination
column S1 and S2
column S2 and S3
column S3 and S4
...
all possible three pair combination
column S1, S2 and S3
column S2, S3 and S4
column S3, S4 and S5
...
【问题讨论】:
-
你想要一个包含 100 个 data.frames 的列表和一个包含 1000 个 data.frames 的列表?
标签: r package combinations