| ExprBuilder | R Documentation |
Build an expression that will be used inside a data.table::data.table's frame. This shouldn't be used directly.
In general, a modified self with extended expression.
appendsExtra expressions that go at the end.
exprThe final expression that can be evaluated with base::eval() or
rlang::eval_bare().
new()Constructor.
ExprBuilder$new(
DT,
dt_pronouns = list(),
nested = list(),
verbose = getOption("table.express.verbose", FALSE)
)DTA data.table::data.table.
dt_pronouns, nestedInternal parameters for joins.
verbosePrint more information during the process of building expressions.
set_i()Set the i clause expression(s), starting a new frame if the current
one already has said expression set.
ExprBuilder$set_i(value, chain_if_needed)
valueA captured expression.
chain_if_neededWhether chaining is allowed during this step.
set_j()Like set_i but for the j clause.
ExprBuilder$set_j(value, chain_if_needed)
valueA captured expression.
chain_if_neededWhether chaining is allowed during this step.
set_by()Set the by clause expression.
ExprBuilder$set_by(value, chain_if_needed)
valueA captured expression.
chain_if_neededWhether chaining is allowed during this step.
chain()By default, start a new expression with the current one as its
parent. If type = "pronoun", dt is used to start a new expression
that joins the current one.
ExprBuilder$chain(type = "frame", next_dt, parent_env, to_eager = FALSE)
typeOne of "frame", "pronoun".
next_dtNext data table when chaining pronoun.
parent_envWhere to evaluate current expression when chaining pronoun.
to_eagerWhether or not to use an EagerExprBuilder in the new chain
chain_if_set()Chain if any clause values are already set.
ExprBuilder$chain_if_set(...)
...Clause values.
seek_and_nestroy()Helper for nest_expr.
ExprBuilder$seek_and_nestroy(.exprs)
.exprsList of expressions.
eval()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.
ExprBuilder$eval(parent_env, by_ref, ...)
parent_envEnclosing environment.
by_refFlag to control deep copies.
...Additional variables for the evaluation environment.
tidy_select()Evaluate a tidyselect call using the currently captured table.
ExprBuilder$tidy_select(select_expr)
select_exprThe selection expression.
print()Prints the built expr.
ExprBuilder$print(...)
...Ignored.
clone()The objects of this class are cloneable with this method.
ExprBuilder$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.