Answers for "how many pairwise combinations"

R
0

how many pairwise combinations

# 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
Posted by: Guest on February-26-2021

Browse Popular Code Answers by Language