📜  有多少成对组合 - R 编程语言代码示例

📅  最后修改于: 2022-03-11 14:52:01.634000             🧑  作者: Mango

代码示例1
# Given "LIST" a list of N elements, the number of unique pairwise comparisons 
# among them is given by the formula:
ncomp = N(N-1)/2

# In order to operate all the pairwise comparison in R
library(RcppAlgos)

comboGeneral( LIST , m=2 ). #m = 2 mean PAIRWISE comparison

#To operate multiple comparisons (among 3 or mode elements) just increase m