View source: R/matrixExlusionTuples.R
matrixExclusionTuples | R Documentation |
If item exclusions are stored as a matrix, matrixExclusionTuples
transforms this format into item pairs ('tuples').
Information on exclusions has to be coded as 1
(items are exclusive) and 0
(items are not exclusive).
matrixExclusionTuples(exclMatrix)
exclMatrix |
A |
Exclusion tuples can be used by itemExclusionConstraint
to set up exclusion constraints.
A data.frame
with two columns.
# Example data.frame
exclDF <- data.frame(c(0, 1, 0, 0),
c(1, 0, 0, 1),
c(0, 0, 0, 0),
c(0, 1, 0, 0))
rownames(exclDF) <- colnames(exclDF) <- paste0("item_", 1:4)
# Create tuples
matrixExclusionTuples(exclDF)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.