Skip to contents

For a given length, create an empty list of that length.

Usage

empty.list(length = 0L)

Arguments

length

integer, specified length of the output list.

Value

an empty list of given length.

Details

This is a simple wrapper of vector("list", length) with a clearer naming convention.

See also

Examples

empty.list()
#> list()
empty.list(5L)
#> [[1]]
#> NULL
#> 
#> [[2]]
#> NULL
#> 
#> [[3]]
#> NULL
#> 
#> [[4]]
#> NULL
#> 
#> [[5]]
#> NULL
#> 
empty.list(length = 3L)
#> [[1]]
#> NULL
#> 
#> [[2]]
#> NULL
#> 
#> [[3]]
#> NULL
#>