empty_list.Rd
Creates a list with a specified number of empty slots.
empty_list(size, labels = NULL)
The number of slots.
An optional character
vector (whose length equals
size
) with labels for the
slots.
A list.
# An empty list with 3 slots
empty_list(3)
#> [[1]]
#> NULL
#>
#> [[2]]
#> NULL
#>
#> [[3]]
#> NULL
#>
# An empty list with labels
empty_list( 3, paste0( "S0", 1:3 ) )
#> $S01
#> NULL
#>
#> $S02
#> NULL
#>
#> $S03
#> NULL
#>