tuplicated: Find Elements That Are Repeated At Least n Times

Description Usage Arguments Details See Also Examples

Description

Finds elements that are repeated at least n times in a vector.

Usage

1
tuplicated(x, n, ..., fromLast = FALSE)

Arguments

x

A vector.

n

An integer.

...

Other optional arguments are ignored.

fromLast

A logical indicating if n-replication should be considered from the right side of the vector. If TRUE, the n-1 last (or rightmost) of replicated identical elements return FALSE.

Details

Returns a logical vector that is TRUE when it runs into any but the (n-1)-st occurrences of an element, analogous to duplicated.

See Also

duplicated

Examples

1
2
x <- c(NA, 1:3, 4:5, rep(6, 6), 3, NA, 4, 3, 3)
all(tuplicated(x, 3) == triplicated(x))

tuple documentation built on May 2, 2019, 12:39 a.m.