select: Select/rename variables by name

Description Usage Arguments Value Examples

Description

Choose or rename variables from a tbl. select() keeps only the variables you mention; rename() keeps all variables.

Usage

1
2
3
4
## S3 method for class 'FDF'
select(.data, ...)

select(.data, ...)

Arguments

.data

A FDF.

...

Expressions to compute

These arguments are automatically quoted and evaluated in a context where elements of vars are objects representing their positions within vars. They support unquoting and splicing. See vignette("programming") for an introduction to these concepts.

Note that except for :, - and c(), all complex expressions are evaluated outside that context. This is to prevent accidental matching to vars elements when you refer to variables from the calling context.

Value

An object of the same class as .data.

Examples

1
2
3
4
5
6
7
(test <- FDF(datasets::iris))
select(test, 1:4)
select(test, -5)
select(test, -Species)
select(test, c("Sepal.Length", "Sepal.Width"))
select(test, Sepal.Length, Sepal.Width)
select(test, starts_with("Sepal"))

privefl/bigdfr documentation built on May 20, 2019, 9:39 a.m.