util_count_duplicates {assertions} | R Documentation |
Count the number of duplicated values in a vector
Description
This function returns the number of duplicated values in the input vector.
Usage
util_count_duplicates(x)
Arguments
x |
A vector. |
Value
The number of duplicated values in the input vector.
Examples
if(interactive()) {
util_count_duplicates(c(1, 2, 2)) # returns 1
util_count_duplicates(c(1, 2, 3)) # returns 0
}
[Package assertions version 0.1.0 Index]