show_duplicates: Show Duplicate Observations in Your Dyad-Year or State-Year...

View source: R/show_duplicates.R

show_duplicatesR Documentation

Show Duplicate Observations in Your Dyad-Year or State-Year Data Frame

Description

show_duplicates() shows which data are duplicated in data generated in peacesciencer. It's a useful diagnostic tool for users doing some do-it-yourself functions with peacesciencer.

Usage

show_duplicates(data)

Arguments

data

a dyad-year data frame or a state-year data frame created in peacesciencer.

Details

The function leans on attributes of the data that are provided by the create_dyadyear() or create_stateyear() function. Make sure that function (or data created by that function) appear at the top of the proverbial pipe.

The data returned will also have a new column called duplicated. Thus, an implicit assumption in this function is the user does not have a column in the data with this name that is of interest to the user. It will be overwritten.

Value

show_duplicates() takes a dyad-year data frame or state-year data frame generated in peacesciencer and shows what observations are duplicated by unique combination of dyad-year or state-year, contingent on what was supplied to it.

Author(s)

Steven V. Miller

Examples


# just call `library(tidyverse)` at the top of the your script
library(magrittr)

gml_dirdisp %>% show_duplicates()
cow_mid_dirdisps %>% show_duplicates()

peacesciencer documentation built on March 31, 2023, 8:37 p.m.