pull_distinctly: 'dplyr::pull()' + 'unique()' + 'sort()'

Description Usage Arguments Details Value See Also

View source: R/dplyr-combos.R

Description

Shorthand for {dplyr} functions called consecutively.

Usage

1
pull_distinctly(.data, var = -1, ..., decreasing = FALSE)

Arguments

.data

A table of data

var

A variable specified as:

  • a literal variable name

  • a positive integer, giving the position counting from the left

  • a negative integer, giving the position counting from the right.

The default returns the last column (on the assumption that's the column you've created most recently).

This argument is taken by expression and supports quasiquotation (you can unquote column names and column positions).

...

Additional arguments passed to internal {base}/{stats} functions.

decreasing

logical. Should the sort be increasing or decreasing? For the "radix" method, this can be a vector of length equal to the number of arguments in .... For the other methods, it must be length one. Not available for partial sorting.

Details

This may be slower than dplyr::distinct() + dplyr::arrange() + dplyr::pull() (which was the original implementation).

Value

A vector (of the same type as var).

See Also

Other dplyr-combos: arrange_distinctly, count_arrange


tonyelhabr/tetidy documentation built on May 29, 2019, 3:18 p.m.