Learn R Programming

replacer (version 1.0.2)

whichDups: Find duplicated values in data

Description

The function finds duplicated values in each column of the data file. Although not intended for direct use, it can be applied to a data file once converted into "data.table" class.

Usage

whichDups(x)

Value

A named character vector. Data columns containing distinct sets of duplicated values have the names indexed.

Arguments

x

A data.table.

Examples

Run this code

if (interactive()) {

  dir = system.file('extdata', package = 'replacer')
  setwd(dir)

  x = data.table::fread('data.csv', na.strings = c(NA_character_, ''))

  whichDups(x)

}

Run the code above in your browser using DataLab