Compute summaries for columns, perhaps by group.

# S3 method for ExprBuilder
summarize(
  .data,
  ...,
  .assume_optimized = NULL,
  .parse = getOption("table.express.parse", FALSE),
  .chain = getOption("table.express.chain", TRUE)
)

# S3 method for ExprBuilder
summarise(
  .data,
  ...,
  .assume_optimized = NULL,
  .parse = getOption("table.express.parse", FALSE),
  .chain = getOption("table.express.chain", TRUE)
)

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

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

# S3 method for data.table
summarize(.data, ...)

# S3 method for data.table
summarise(.data, ...)

Arguments

.data

An instance of ExprBuilder.

...

Clauses for transmuting columns. For j inside the data.table's frame.

.assume_optimized

An optional character vector with function names that you know data.table can optimize. This will be added to this set of known names: min, max, mean, median, var, sd, sum, prod, first, last. Note that using those functions (and only those in a given call to this function) will prevent the expressions from using variables created by previous expressions.

.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 built expression is similar to what transmute builds, but the function also checks that the results have length 1.

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