util_get_duplicated_values: Get the duplicated values in a vector

View source: R/has.R

util_get_duplicated_valuesR Documentation

Get the duplicated values in a vector

Description

This function returns a vector of the duplicated values in the input vector.

Usage

util_get_duplicated_values(x)

Arguments

x

A vector.

Value

A vector of the duplicated values in the input vector.

Examples

if(interactive()) {
util_get_duplicated_values(c(1, 2, 2))  # returns 2
util_get_duplicated_values(c(1, 2, 3))  # returns NULL
}

assertions documentation built on April 3, 2025, 5:52 p.m.