Learn R Programming

SwimmeR (version 0.14.2)

list_to_list_names: Initialize a named list of lists

Description

Convert a single list to a list of lists, with the names of the lists taken from the original list, list_of_names. The new lists will all have a single value, initialized as value.

Usage

list_to_list_names(list_of_names, value = 0)

Value

returns a list of lists with sub-list names from list_of_names

and first elements from value. Used inside determine_entries

Arguments

list_of_names

a list of values, likely strings, to be the names of sub-lists in a new list of lists

value

a value to initialize elements of all sub-lists to. Defaults to 0. If value has multiple elements those elements will become sub-list elements