View source: R/list_to_matrix.r
list_to_matrix | R Documentation |
Create a design-type matrix based on the elements of a list. Each column in the produced matrix is linked to the vectors in the list. See example.
list_to_matrix(alist)
alist |
a list of numeric vectors |
A design-type matrix
Gaston Sanchez
list_to_dummy
, indexify
# let's say you have a list like this
num_list = list(1:3, 4:5, 6:9)
# get design-type matrix
list_to_matrix(num_list)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.