extract_duplicate_records: Extract Duplicate Records

View source: R/duplicates.R

extract_duplicate_recordsR Documentation

Extract Duplicate Records

Description

Extract Duplicate Records

Usage

extract_duplicate_records(dataset, by_vars = NULL)

Arguments

dataset

Input dataset

The variables specified by the by_vars argument are expected to be in the dataset.

Default value

none

by_vars

Grouping variables

Defines groups of records in which to look for duplicates. If omitted, all variables in the input dataset are used in the by group.

Note: Omitting by_vars will increase the function's run-time, so it is recommended to specify the necessary grouping variables for large datasets whenever possible.

Permitted values

list of variables created by exprs(), e.g., exprs(USUBJID, VISIT)

Default value

NULL

Value

A data.frame of duplicate records within dataset

See Also

Other internal: admiral-package, format.basket_select(), signal_duplicate_records()

Examples

data(admiral_adsl)

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

extract_duplicate_records(adsl, exprs(USUBJID))

Roche-GSK/admiral documentation built on April 14, 2025, 12:36 p.m.