list2fullDF.byNames | R Documentation |
Converts a list to a full matrix, with rows and columns named by the elements of the list.
list2fullDF.byNames(
your.list = list(set.1 = vec.fromNames(LETTERS[1:5], fill = 1), set.2 =
vec.fromNames(LETTERS[3:9], fill = 2)),
as.df = TRUE,
byRow = TRUE,
FILL = NA
)
your.list |
A list. |
as.df |
Logical. Whether to return a data frame (default) or a matrix. |
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.byNames(your.list)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.