Skip to contents

Detect duplicated strings

Usage

duplicated_paste(...)

Arguments

...

Arguments passed on to base::paste

sep

a character string to separate the terms. Not NA_character_.

collapse

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

recycle0

logical indicating if zero-length character arguments should lead to the zero-length character(0) after the sep-phase (which turns into "" in the collapse-phase, i.e., when collapse is not NULL).

Value

A logical vector of the same length as the longest vector passed to ....

Examples

duplicated_paste(c("a", "a"), 1:2)
#> [1] FALSE FALSE
paste(c("a", "a"), 1:2)
#> [1] "a 1" "a 2"

duplicated_paste(c("a", "a"), c(1, 1))
#> [1] FALSE  TRUE
paste(c("a", "a"), c(1, 1))
#> [1] "a 1" "a 1"