Learn R Programming

table.express (version 0.1.1)

ExprBuilder: Frame expression builder

Description

Build an expression that will be used inside a data.table::data.table's frame.

Usage

ExprBuilder

Arguments

Format

An object of class R6ClassGenerator of length 24.

Fields

appends

Extra expressions that go at the end.

expr

The final expression that can be evaluated with base::eval() or rlang::eval_bare().

Methods

initialize(DT)

Constructor that receives a data.table::data.table in DT.

set_select(value, chain_if_needed)

Set the select clause expression(s), starting a new frame if the current one already has said expression set.

set_where(value, chain_if_needed)

Like set_select but for the where clause.

set_by(value)

Set the by clause expression.

chain()

Start a new expression with the current one as its parent.

eval(parent_env, by_ref, ...)

Evaluate the final expression with parent_env as the enclosing environment. If by_ref = FALSE, data.table::copy() is called before. The ellipsis' contents are assigned to the expression's evaluation environment.

print(...)

Prints the built expr.