Extend a character vector by appending empty strings at the end.
extend_char_vec(char_vec, extend_by = NA, length_out = NA)
str_extend_char_vec(char_vec, extend_by = NA, length_out = NA)
A character vector. The thing you wish to expand.
A non-negative integer. By how much do you wish to extend the vector?
A positive integer. How long do you want the output vector to be?
A character vector.
extend_char_vec(1:5, extend_by = 2)
#> [1] "1" "2" "3" "4" "5" "" ""
extend_char_vec(c("a", "b"), length_out = 10)
#> [1] "a" "b" "" "" "" "" "" "" "" ""