turner (version 0.1.7)

list_to_matrix: Design-type matrix from the elements in a list

Description

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.

Usage

list_to_matrix(alist)

Value

A design-type matrix

Arguments

alist

a list of numeric vectors

Author

Gaston Sanchez

See Also

list_to_dummy, indexify

Examples

Run this code
# 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)

Run the code above in your browser using DataCamp Workspace