paste3: paste3

Description Usage Arguments Details Examples

View source: R/misc.R

Description

Paste while removing NAs

Usage

1
paste3(..., sep = " ")

Arguments

...

Strings to paste

sep

Character used to separate pasted strings

Details

Removes NAs from pasted elements, but if ALL elements are NA, the result is NA.

Shamelessly copied from https://stackoverflow.com/questions/13673894/suppress-nas-in-paste

Examples

1
paste3(c("a", "b", "c", NA), c("A","B", NA, NA))

joelnitta/jntools documentation built on Jan. 17, 2022, 3:05 p.m.