countIntersect.Rd
Given n
sets, countIntersect
computes the number of elements
being shared by the individual n*(n-1)/2
pairs of sets.
countIntersect(..., logical = FALSE)
... | several numeric or character vectors to intersect; alternatively, a data frame or matrix can be supplied, whose columns will be treated as individual sets |
---|---|
logical | should |
A matrix of size n*n
. If logical==FALSE
, on the diagonal,
there are numbers of elements in each set, and at position i,j
there is the number of elements in set j
shared with set i
.
If logical==TRUE
, on the diagonal, there are numbers of TRUE
s
in each set, and at position i,j
there is the number of TRUE
s
shared by sets i
and j
.
countIntersect(1:2,1:3)#> 1:2 1:3 #> 1:2 2 2 #> 1:3 2 3#> c("a", "b") c("a", "c") c("b", "c") #> c("a", "b") 2 1 1 #> c("a", "c") 1 2 1 #> c("b", "c") 1 1 2