tuplicate: Find n-Replicated Elements

Description Usage Arguments Details See Also Examples

Description

Finds elements that occur exactly n times in a vector.

Usage

1
tuplicate(x, n)

Arguments

x

A vector.

n

An integer.

Details

Returns the n-replicated elements in the same order that they would be returned in a call to orphan. This fundamentally differs from tuplicated, which returns a logical vector that is TRUE when it runs into any but the (n-1)-st and fewer occurrences of an element (and is therefore dependent on the direction of testing of the vector).

See Also

duplicate

Examples

1
2
x <- c(NA, 1:3, 4:5, rep(6, 6), 3, NA, 4, 3, 3)
lapply(2:6, function(X) { tuplicate(x, X) })

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