Learn R Programming

table.express (version 0.4.2)

select-table.express: Select clause

Description

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

Usage

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

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

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

Run this code

data("mtcars")

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

Run the code above in your browser using DataLab