remove_duplicated: Removes Duplicated Rows

Description Usage Arguments Value See Also Examples

View source: R/remove_duplicated.R

Description

Removes duplicated data by column(s)

Usage

1
remove_duplicated(data, ..., opt_keep = "first", opt_summary = TRUE)

Arguments

data

a data frame

...

columns to search for duplicated values; defaults to all arguments

opt_keep

string, which value to keep; takes the values "first", "last", or "none". "none" deletes all duplicated entries, "first" keeps the first duplicate, "last" keeps the last duplicate. Default is "first".

opt_summary

boolean, whether to log drop summaries

Value

Returns a data frame with duplicated rows given by columns removed

See Also

view_duplicated to look at duplicates (but not remove)

Examples

1
2
3
d <- data.frame(x = rep(1:3, each=4), y = rep(1:4, each=3), z = rep(1:2, 6), a = rep(1:6, 2))
view_duplicated(d, y, z)
remove_duplicated(d, y, z)

jennguyen1/jn.general documentation built on March 20, 2018, 4:26 a.m.