select_if: Select columns using a predicate

Description Usage Arguments Details Examples

View source: R/manip.r

Description

This verb is analogous to summarise_if() and mutate_if() in that it lets you use a predicate on the columns of a data frame. Only those columns for which the predicate returns TRUE will be selected.

Usage

1
select_if(.data, .predicate, ...)

Arguments

.data

A local tbl source.

.predicate

A predicate function to be applied to the columns or a logical vector. The columns for which .predicate is or returns TRUE will be summarised or mutated.

...

Additional arguments passed to .predicate.

Details

Predicates can only be used with local sources like a data frame.

Examples

1
2
3

sctyner/dplyr050 documentation built on May 17, 2019, 2:22 p.m.