Learn R Programming

fastplyr (version 0.2.0)

f_select: Fast dplyr::select()/dplyr::rename()

Description

f_select() operates the exact same way as dplyr::select() and can be used naturally with tidy-select helpers. It uses collapse to perform the actual selecting of variables and is considerably faster than dplyr for selecting exact columns, and even more so when supplying the .cols argument.

Usage

f_select(data, ..., .cols = NULL)

f_rename(data, ..., .cols = NULL)

Value

A data.frame of selected columns.

Arguments

data

A data frame.

...

Variables to select using tidy-select. See ?dplyr::select for more info.

.cols

(Optional) faster alternative to ... that accepts a named character vector or numeric vector.
No checks on duplicates column names are done when using .cols.
If speed is an expensive resource, it is recommended to use this.