signal_duplicate_records: Signal Duplicate Records

Description Usage Arguments Author(s) Examples

View source: R/duplicates.R

Description

Signal Duplicate Records

Usage

1
2
3
4
5
6
7
signal_duplicate_records(
  dataset,
  by_vars,
  msg = paste("Dataset contains duplicate records with respect to",
    enumerate(vars2chr(by_vars))),
  cnd_type = "error"
)

Arguments

dataset

A data frame

by_vars

A list of variables created using vars() identifying groups of records in which to look for duplicates

msg

The condition message

cnd_type

Type of condition to signal when detecting duplicate records. One of "message", "warning" or "error". Default is "error".

Author(s)

Thomas Neitmann

Examples

1
2
3
4
5
6
data(adsl)

# Duplicate the first record
adsl <- rbind(adsl[1L, ], adsl)

signal_duplicate_records(adsl, vars(USUBJID), cnd_type = "message")

epijim/admiral documentation built on Feb. 13, 2022, 12:15 a.m.