Learn R Programming

rtry (version 1.1.0)

rtry_remove_dup: Remove duplicates in data

Description

This function removes the duplicates from the input data using the duplicate identifier OrigObsDataID provided within the TRY data. Once the function is called and executed, the number of duplicates removed will be displayed on the console as reference.

Usage

rtry_remove_dup(input, showOverview = TRUE)

Value

An object of the same type as the input data after removing the duplicates.

Arguments

input

Input data frame or data table.

showOverview

Default TRUE displays the the dimension of the data after removing the duplicates.

References

This function makes use of the subset function within the base package.

Examples

Run this code
# Remove the duplicates within the provided sample data (data_TRY_15160)
data_rm_dup <- rtry_remove_dup(data_TRY_15160)

# Expected message:
# 45 duplicates removed.
# dim:   1737 28

Run the code above in your browser using DataLab