Learn R Programming

SciencesPo (version 1.3.6)

flag: Flag duplicated observations

Description

Marks how many times an observation appears in the dataset.

Usage

flag(obj = .data, check.by = NULL)

Arguments

obj
The data object.
check.by
The formula for checking row-wise for duplicates.

Examples

Run this code
df <- data.frame(matrix(c(51,42,43,1,22,51,
                 92,28,21,1,22,9),ncol=3, byrow = TRUE))
colnames(df) <- c("A","B","C")
flag(df, check.by = c("A", "B") )

Run the code above in your browser using DataLab