select() keeps only the variables you mention; rename() keeps all variables.

# S3 method for 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

(test <- FDF(datasets::iris))
#> # A Filebacked Data Frame with 150 rows and 5 columns.
select(test, 1:4)
#> # A Filebacked Data Frame with 150 rows and 4 columns.
select(test, -5)
#> # A Filebacked Data Frame with 150 rows and 4 columns.
select(test, -Species)
#> # A Filebacked Data Frame with 150 rows and 4 columns.
select(test, c("Sepal.Length", "Sepal.Width"))
#> # A Filebacked Data Frame with 150 rows and 2 columns.
select(test, Sepal.Length, Sepal.Width)
#> # A Filebacked Data Frame with 150 rows and 2 columns.
select(test, starts_with("Sepal"))
#> # A Filebacked Data Frame with 150 rows and 2 columns.