flag_duplicate_id: Flag duplicates by identifiers

Description Usage Arguments Value Examples

View source: R/flag_duplicate_id.R

Description

Flags articles in a dataframe that are duplicated and has the same identifier

Usage

1

Arguments

df

a data frame with potential duplicates

keys

a character vector of identifier variables in the data frame

Value

The original data frame is returned with a new column "duplicate_by_id", that can be 0 or 1

Examples

1
2
3
4
5
6
# Show all articles with duplicated ids
library(dplyr)
merge_sources(workaholism_psychinfo, workaholism_pubmed, workaholism_scopus,
              .renames = c("journal" = "publication")) %>%
 flag_duplicate_id(keys = c("psyid", "pmid", "doi", "eid", "sid")) %>%
 filter(duplicate_by_id == 1)

nthun/metamanager documentation built on Aug. 9, 2019, 1:37 p.m.