Learn R Programming

assertions (version 0.1.0)

util_get_duplicated_values: 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)

Value

A vector of the duplicated values in the input vector.

Arguments

x

A vector.

Examples

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

Run the code above in your browser using DataLab