collect(e, syms) groups the additive terms of e by powers of the
symbols (or expressions) in syms, as SymPy's collect(); it does not
expand e first. With evaluate = FALSE it returns a named list mapping
the collected powers (by their printed form) to their coefficients.
rcollect(e, ...) collects recursively inside the arguments.
Usage
collect(
e,
syms,
func = NULL,
evaluate = TRUE,
exact = FALSE,
distribute_order_term = TRUE
)
rcollect(e, ...)Arguments
- e
An expression.
- syms
A symbol, expression or list of them.
- func
Optional function applied to each coefficient.
- evaluate
Return the collected expression (default) or a list.
- exact
Collect only exact powers of the patterns.
- distribute_order_term
Distribute an order term over the coefficients.
- ...
Symbols for
rcollect().