list_to_list_names: Initialize a named list of lists

View source: R/list_to_list_names.R

list_to_list_namesR Documentation

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)

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

Value

returns a list of lists with sub-list names from list_of_names and first elements from value. Used inside determine_entries


gpilgrim2670/SwimmeR documentation built on March 26, 2023, 5:05 p.m.