select-table.express {table.express}R Documentation

Select clause

Description

Select columns of a data.table::data.table.

Usage

## S3 method for class 'ExprBuilder'
select(
  .data,
  ...,
  .negate = FALSE,
  .parse = getOption("table.express.parse", FALSE),
  .chain = getOption("table.express.chain", TRUE)
)

## S3 method for class 'EagerExprBuilder'
select(.data, ..., .parent_env = rlang::caller_env())

## S3 method for class 'data.table'
select(.data, ...)

Arguments

.data

An instance of ExprBuilder.

...

Clause for selecting columns. For j inside the data.table's frame.

.negate

Whether to negate the selection semantics and keep only columns that do not match what's given in ....

.parse

Logical. Whether to apply rlang::parse_expr() to obtain the expressions.

.chain

Logical. Should a new frame be automatically chained to the expression if the clause being set already exists?

.parent_env

See end_expr()

Details

The expressions in ... support tidyselect::select_helpers.

To see more examples, check the vignette, or the table.express-package entry.

Examples


data("mtcars")

data.table::as.data.table(mtcars) %>%
    select(mpg:cyl)


[Package table.express version 0.4.2 Index]