Learn R Programming

dplyr (version 0.7.1)

tally_: Deprecated SE versions of main verbs.

Description

dplyr used to offer twin versions of each verb suffixed with an underscore. These versions had standard evaluation (SE) semantics: rather than taking arguments by code, like NSE verbs, they took arguments by value. Their purpose was to make it possible to program with dplyr. However, dplyr now uses tidy evaluation semantics. NSE verbs still capture their arguments, but you can now unquote parts of these arguments. This offers full programmability with NSE verbs. Thus, the underscored versions are now superfluous.

Usage

tally_(x, wt, sort = FALSE)

count_(x, vars, wt = NULL, sort = FALSE)

add_tally_(x, wt, sort = FALSE)

add_count_(x, vars, wt = NULL, sort = FALSE)

distinct_(.data, ..., .dots, .keep_all = FALSE)

do_(.data, ..., .dots = list())

funs_(dots, args = list(), env = base_env())

group_by_(.data, ..., .dots = list(), add = FALSE)

group_indices_(.data, ..., .dots = list())

filter_(.data, ..., .dots = list())

slice_(.data, ..., .dots = list())

summarise_(.data, ..., .dots = list())

summarize_(.data, ..., .dots = list())

mutate_(.data, ..., .dots = list())

transmute_(.data, ..., .dots = list())

arrange_(.data, ..., .dots = list())

select_(.data, ..., .dots = list())

rename_(.data, ..., .dots = list())

select_vars_(vars, args, include = character(), exclude = character())

rename_vars_(vars, args)

Arguments

x

a tbl() to tally/count.

wt

(Optional) If omitted, will count the number of rows. If specified, will perform a "weighted" tally by summing the (non-missing) values of variable wt. This argument is automatically quoted and later evaluated in the context of the data frame. It supports unquoting. See vignette("programming") for an introduction to these concepts.

sort

if TRUE will sort output in descending order of n

vars

Various meanings depending on the verb.

.data

A 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.

dots, .dots, ...

Pair/values of expressions coercible to lazy objects.

args

Various meanings depending on the verb.

env

The environment in which functions should be evaluated.

add

When add = FALSE, the default, group_by() will override existing groups. To add to the existing groups, use add = TRUE.

include

Character vector of column names to always include/exclude.

exclude

Character vector of column names to always include/exclude.

Details

Unquoting triggers immediate evaluation of its operand and inlines the result within the captured expression. This result can be a value or an expression to be evaluated later with the rest of the argument. See vignette("programming") for more information.