any_duplicated: Function to test if a vector contains duplicate elements.

View source: R/any_duplicated.R

any_duplicatedR Documentation

Function to test if a vector contains duplicate elements.

Description

Unlike anyDuplicated which returns the index value of the first duplicated element, any_duplicated is simpler and returns a logical vector.

Usage

any_duplicated(x)

Arguments

x

A vector to test for duplicate elements.

Value

Logical vector with a length of 1.

Author(s)

Stuart K. Grange


skgrange/threadr documentation built on April 15, 2024, 9:35 p.m.