add_rnk_col: 'dplyr::mutate(... dplyr::row_number(dplyr::desc(.)))'

Description Usage Arguments Value Borrowing from the {tidyverse} See Also

View source: R/dplyr-cols.R

Description

Shorthand for {dplyr} functions called consecutively.

Usage

1
2
add_rnk_col(data, col, col_out = "rnk", arrange = TRUE,
  pretty = TRUE)

Arguments

data

A data.frame.

col

A character for the SE version; a symbol for NSE version. The name of column in data on which to perform operations.

col_out

Name of the new column to create, as a string or symbol.

arrange

If TRUE, will arrange data according to col_out (calling dplyr::arrange()). Does not currently support grouped arranging (i.e. via .by_group).

pretty

If TRUE, will re-order columns such that col_out is the first column.

Value

A tibble.

Borrowing from the {tidyverse}

Documentation for col and col_out is modified tidyr::gather()'s documentation of key and value.

See Also

Other dplyr-cols: select_one_of


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