tests/testthat/data/stringr/examples/str_c.Rd.R

library(stringr)


### Name: str_c
### Title: Join multiple strings into a single string.
### Aliases: str_c

### ** Examples

str_c("Letter: ", letters)
str_c("Letter", letters, sep = ": ")
str_c(letters, " is for", "...")
str_c(letters[-26], " comes before ", letters[-1])

str_c(letters, collapse = "")
str_c(letters, collapse = ", ")

# Missing inputs give missing outputs
str_c(c("a", NA, "b"), "-d")
# Use str_replace_NA to display literal NAs:
str_c(str_replace_na(c("a", NA, "b")), "-d")
PRL-PRG/runr documentation built on Oct. 13, 2022, 8:08 a.m.