Description Usage Arguments Value Examples
Pairwise overlap coefficient of lists
1 | listOverlapCoefficient(x, y = NULL, checkUniqueNonNA = TRUE)
|
x |
A list of vectors that are interpreted as sets of elements |
y |
A list of vectors that are interpreted as sets of elements. In case of |
checkUniqueNonNA |
Logical, should vectors in the list be first cleaned up so that NA values
are removed and the elements are made unique? Default is set as |
A matrix of column-wise pairwise overlap coefficients.
1 2 3 4 5 6 7 8 9 10 11 12 | set.seed(1887)
testSets1 <- sapply(rbinom(10, size=26, prob=0.3),
function(x) sample(LETTERS, x, replace=FALSE))
names(testSets1) <- sprintf("List%d", seq(along=testSets1))
testSets1Poe <- listOverlapCoefficient(testSets1)
testSets1PoeNoCheck <- listOverlapCoefficient(testSets1, checkUniqueNonNA=FALSE)
stopifnot(identical(testSets1Poe, testSets1PoeNoCheck))
testSets2 <- sapply(rbinom(15, size=26, prob=0.3),
function(x) sample(LETTERS, x, replace=FALSE))
names(testSets2) <- sprintf("AnotherList%d", seq(along=testSets2))
testSets12Poe <- listOverlapCoefficient(testSets1, testSets2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.