View source: R/list-to-matrix.R
list_to_matrix | R Documentation |
Convert a list of sets into a binary matrix.
list_to_matrix(sets)
sets |
named list of sets (vectors) to be converted to binary matrix. |
binary matrix with a column for each set. rownames of the matrix represent the union of all sets. A '1' indicates the inclusion of the element in the set.
sets <- list(
"set1" = letters[1:5],
"set2" = letters[2:6],
"set3" = letters[1:7]
)
list_to_matrix(sets)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.