combine_words_ptbr(words, sep = NULL, last = NULL)
Arguments
- words
a character vector with words to combine
- sep
a character with the separator of the words. Default is NULL and insert ", "
- last
a character vector with the last separator of the words. Default is NULL and insert " e "
Acknowledgment
combine_words_ptbr() uses transformers
available in the excellent {glue} package
Examples
# \donttest{
misc::ipak("glue")
#> ℹ Successfully loaded:
#> pkg_name version
#> glue 1.8.0
# using in an ordinary text
feira <- c("banana", "maça", "pepino", "ovos")
glue("Por favor, compre: {combine_words_ptbr(feira)}")
#> Por favor, compre: banana, maça, pepino e ovos
# }