Learn R Programming

keyholder (version 0.1.7)

keyed-df-one-tbl: One-table verbs from dplyr for keyed_df

Description

Defined methods for dplyr generic single table functions. Most of them preserve 'keyed_df' class and 'keys' attribute (excluding summarise with scoped variants, distinct and do which remove them). Also these methods modify rows in keys according to the rows modification in reference data frame (if any).

Usage

# S3 method for keyed_df
select(.data, ...)

# S3 method for keyed_df rename(.data, ...)

# S3 method for keyed_df mutate(.data, ...)

# S3 method for keyed_df transmute(.data, ...)

# S3 method for keyed_df summarise(.data, ...)

# S3 method for keyed_df group_by(.data, ...)

# S3 method for keyed_df ungroup(x, ...)

# S3 method for keyed_df rowwise(data, ...)

# S3 method for keyed_df distinct(.data, ..., .keep_all = FALSE)

# S3 method for keyed_df do(.data, ...)

# S3 method for keyed_df arrange(.data, ..., .by_group = FALSE)

# S3 method for keyed_df filter(.data, ...)

# S3 method for keyed_df slice(.data, ...)

Arguments

.data, data, x

A keyed object.

...

Appropriate arguments for functions.

.keep_all

Parameter for dplyr::distinct.

.by_group

Parameter for dplyr::arrange.

Details

dplyr::transmute() is supported implicitly with dplyr::mutate() support.

dplyr::rowwise() is not supposed to be generic in dplyr. Use rowwise.keyed_df directly.

All scoped variants of present functions are also supported.

See Also

Two-table verbs

Examples

Run this code
mtcars %>% key_by(vs, am) %>% dplyr::mutate(gear = 1)

Run the code above in your browser using DataLab