tuplicated {tuple}R Documentation

Find Elements That Are Repeated At Least n Times

Description

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

Usage

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

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

[Package tuple version 0.4-02 Index]