find_duplicates {kim} | R Documentation |
Find duplicated values in a vector
Description
Find duplicated values in a vector
Usage
find_duplicates(vector = NULL, na.rm = TRUE, sigfigs = 2, output = "summary")
Arguments
vector |
a vector whose elements will be checked for duplicates |
na.rm |
logical. If |
sigfigs |
number of significant digits to round to in the percent column of the summary (default = 2) |
output |
type of output. If |
Value
the output will be a data.table object (summary), a vector of duplicated values, or a vector non-duplicated values.
Examples
find_duplicates(mtcars$cyl)
find_duplicates(mtcars$cyl, output = "duplicated_values")
find_duplicates(vector = c(mtcars$cyl, 11:20, NA, NA))
find_duplicates(vector = c(mtcars$cyl, 11:20, NA, NA), na.rm = FALSE)
find_duplicates(vector = c(mtcars$cyl, 11:20, NA, NA),
na.rm = FALSE, sigfigs = 4, output = "duplicated_values")