paste2: Concatenate Strings while omitting NA

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

Concatenate vectors after converting to character and removing NA values. See paste.

Usage

1
paste2(..., sep = " ", collapse = NULL, na.rm = TRUE)

Arguments

...

one or more R objects, to be converted to character vectors.

sep

a character string to separate the terms. Not NA_character_.

collapse

an optional character string to separate the results. Not NA_character_.

na.rm

logical, indicating whether NA values should be stripped before concatenation. Not NA_character_.

Value

A character vector of the concatenated values.

Examples

1
paste2("word", NA)

tidySEM documentation built on Nov. 17, 2021, 1:07 a.m.