findSubexprs {nlsr} | R Documentation |
findSubexprs
Description
Find common sub-expressions in expr
.
Usage
findSubexprs(expr, simplify = FALSE, tag = ".expr", verbose = FALSE, ...)
Arguments
expr |
An expression represented in a variety of ways. See Details. |
simplify |
Whether to simplify. |
tag |
to be attached to the returned object(s) |
verbose |
If |
... |
Additional arguments, passed to |
.
Details
If expr
contains repeated subexpressions, this function
returns an expression to evaluate them just once and store them
in temporary variables with names starting with the tag
.
This function is used internally by codeDeriv
.
Examples
findSubexprs(expression(x^2 + x^2), tag = ".example")
[Package nlsr version 2023.8.31 Index]