distinct {tidyseurat} | R Documentation |
Keep distinct/unique rows
Description
Keep only unique/distinct rows from a data frame. This is similar
to unique.data.frame()
but considerably faster.
Usage
## S3 method for class 'Seurat'
distinct(.data, ..., .keep_all = FALSE)
Arguments
.data |
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). See Methods, below, for more details. |
... |
< |
.keep_all |
If |
Value
An object of the same type as .data
. The output has the following
properties:
Rows are a subset of the input but appear in the same order.
Columns are not modified if
...
is empty or.keep_all
isTRUE
. Otherwise,distinct()
first callsmutate()
to create new columns.Groups are not modified.
Data frame attributes are preserved.
Methods
This function is a generic, which means that packages can provide implementations (methods) for other classes. See the documentation of individual methods for extra arguments and differences in behaviour.
The following methods are currently available in loaded packages: no methods found.
Examples
data("pbmc_small")
pbmc_small |> distinct(groups)