In a list of vectors, pad short vectors

padVectors(x, padWith = "")

Arguments

x

The list of vectors

padWith

The element to pad with

Value

The list with the padded vectors

Examples

comma::padVectors(
  list(
    c(1, 2, 3),
    4,
    c(5, 6)
  )
);
#> [[1]]
#> [1] 1 2 3
#> 
#> [[2]]
#> [1] "4" ""  "" 
#> 
#> [[3]]
#> [1] "5" "6" "" 
#>