paste_na: Paste with NA suppression

View source: R/paste_na.R

paste_naR Documentation

Paste with NA suppression

Description

This enables 'paste' to work even when some of the entries are NA values, and the desired output is an empty string when NAs are pasted.

Usage

paste_na(..., sep = " ")

Arguments

...

List of R objects, to be converted to character vectors.

sep

A character string to separate the terms.

Details

This is originally from the following StackOverflow post: https://stackoverflow.com/questions/13673894/suppress-nas-in-paste#15673180 This is simply a cosmetically changed version of 42-'s answer.


sysilviakim/Kmisc documentation built on Jan. 28, 2023, 10:58 a.m.