concat: Concatenation Ignoring NA

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Infix operators for string concatenation. NA values are ignored rather than pasted as literals (the default paste behavior).

Usage

1
2
3
4
5
6
7
concat(x, y, sep)

x %&% y

x %_% y

x % % y

Arguments

sep

a character string to separate the terms. Not NA_character_.

Value

A string equal to the concatenation of ....

Examples

1
2
3
4
5
6
7
"Timestamp: " %&% Sys.time()
c(1,2) %&% c("a","b")
"foo" %&% "bar"
"foo" %&% NA
NA %&% "bar"
c("foo",NA) %&% "buzz"
c("foo","fizz") % % c("bar","buzz") %_% 1

rebelrebel04/xplor documentation built on May 27, 2019, 4:01 a.m.