Learn R Programming

turner (version 0.1.9)

dummy_to_list: Create an indexed list from a dummy matrix

Description

Create an indexed list from the columns of a dummy (or semi-dummy) matrix

Usage

dummy_to_list(Dummy)

Value

A list of indexed vectors

Arguments

Dummy

matrix (dummy by columns)

Author

Gaston Sanchez

See Also

list_to_dummy, listify

Examples

Run this code
# let's say you have a list like this
some_list = list(1:3, 1:2, 1:4)

# first create a dummy matrix based on some_list
some_dummy = list_to_dummy(some_list)

# now apply 'dummy_to_list'
dummy_to_list(some_dummy)

# a semi-dummy matrix
semi_dummy = some_dummy
semi_dummy[semi_dummy != 0] = rnorm(listsize(some_list))
dummy_to_list(semi_dummy)

Run the code above in your browser using DataLab