Efficiently combine vectors of unequal lengths into a tibble

make_padded_tibble(lst)

Arguments

lst

A list of vector to combine

Value

A tibble

Details

The function is inspired by this answer given on StackOverflow https://stackoverflow.com/a/7196683/1655567

Examples

make_padded_tibble(list(vecA = 1:10, vecB = 1:5))
#> # A tibble: 10 x 2 #> vecA vecB #> <int> <int> #> 1 1 1 #> 2 2 2 #> 3 3 3 #> 4 4 4 #> 5 5 5 #> 6 6 NA #> 7 7 NA #> 8 8 NA #> 9 9 NA #> 10 10 NA