list2fullDF.presence | R Documentation |
Converts a list to a full matrix, with rows and columns named by the elements of the list. The matrix will contain a 1 in each cell where the corresponding element of the list is present, and a 0 otherwise.
list2fullDF.presence(
your.list = list(set.1 = LETTERS[1:5], set.2 = LETTERS[3:9]),
byRow = TRUE,
FILL = 0
)
your.list |
A list. |
byRow |
Logical. Whether the resulting matrix should be arranged by row (default) or by column. |
FILL |
A value to fill in missing entries. |
A matrix with the same elements as your.list
, but with rows and columns named by the elements of the list.
your.list <- list("set.1" = LETTERS[1:5], "set.2" = LETTERS[3:9])
list2fullDF.presence(your.list)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.