powered by
This function returns the number of duplicated values in the input vector.
util_count_duplicates(x)
The number of duplicated values in the input vector.
A vector.
if(interactive()) { util_count_duplicates(c(1, 2, 2)) # returns 1 util_count_duplicates(c(1, 2, 3)) # returns 0 }
Run the code above in your browser using DataLab