txt_collapse | R Documentation |
Collapse a character vector while removing missing data.
txt_collapse(x, collapse = " ")
x |
a character vector or a list of character vectors |
collapse |
a character string to be used to collapse the vector. Defaults to a space: ' '. |
a character vector of length 1 with the content of x collapsed using paste
paste
txt_collapse(c(NA, "hello", "world", NA)) x <- list(a = c("h", "i"), b = c("some", "more", "text"), c = character(), d = NA) txt_collapse(x, collapse = " ")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.