paste | R Documentation |
An augmented version of base::paste()
with options
to manage 'NA' values.
paste(..., sep = " ", collapse = NULL, na.rm = FALSE) paste0(..., collapse = NULL, na.rm = FALSE)
... |
R objects to be converted to character vectors. |
sep |
A character. A string to separate the terms. |
collapse |
A character. An string to separate the results. |
na.rm |
A logical. Whether to remove NA values from 'x'. |
Character vector of concatenated values.
paste
# Base paste() NA handling behavior paste( 'The', c('red', NA_character_, 'orange'), 'fox jumped', NA_character_, 'over the fence.', collapse = ' ' ) # Removal of NA values paste( 'The', c('red', NA_character_, 'orange'), 'fox jumped', NA_character_, 'over the fence.', collapse = ' ', na.rm = TRUE )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.