Learn R Programming

ir (version 0.4.1)

distinct.ir: Subset distinct/unique rows in ir objects

Description

Subset distinct/unique rows in ir objects

Usage

distinct.ir(.data, ..., .keep_all = FALSE)

Value

.data with distinct rows.

Arguments

.data

An object of class ir.

...

<data-masking> Optional variables to use when determining uniqueness. If there are multiple rows for a given combination of inputs, only the first row will be preserved. If omitted, will use all variables in the data frame.

.keep_all

If TRUE, keep all variables in .data. If a combination of ... is not distinct, this keeps the first row of values.

See Also

Other tidyverse: arrange.ir(), extract.ir(), filter-joins, filter.ir(), group_by, mutate, mutate-joins, nest, pivot_longer.ir(), pivot_wider.ir(), rename, rowwise.ir(), select.ir(), separate.ir(), separate_rows.ir(), slice, summarize, unite.ir()

Examples

Run this code
## distinct
dplyr::distinct(rep(ir_sample_data, 2))


Run the code above in your browser using DataLab