nlsSimplify simplifies expressions according to rules specified
1 2 3 4 5 6 7 8 9
An expression to simplify; this should be a language object.
An environment holding the registered simplifications.
An expression giving a test to apply to decide whether this simplification applies.
The new expression to use to replace the original one.
Whether to evaluate the new expression (to give an even newer expression) to use as the simplification.
An expression to test.
The name of a function as a character string.
nlsSimplify function uses simple rules to simplify
expressions. The simplification is aimed at the needs of this
package, so the built-in simplificatinos assume that variables and expressions
have finite real values. For example,
0*expr will simplify to
regardless of the value of
expr. (The name is
nlsSimplify to avoid a clash with the
function in the
newSimplification adds a new simplification pattern to the
registered collection. The tests are applied to function calls with
the same function and number of parameters, in order as specified.
Users may specify their own environment (perhaps parented by
sysSimplifications) to hold rules if they wish to override the
functions are simple functions to test whether expressions are simple constants,
isCALL function tests whether an expression is a call to a particular
To handle functions which act differently depending on which arguments
nlsSimplify will simplify the expression
TRUE. This is used in the definition of the derivative
x - y, where the unary minus is seen as a missing
nlsSimplify returns a simplification of the expression, assuming
that variables and functions take real values.
newSimplification function is called for the side
effect of recording a new simplification rule.
deriv is missing,
report on the currently saved simplifications in
isFALSE function was added to base R in version 3.5.0;
starting with that version,
nlsr::isFALSE is simply a copy
1 2 3 4 5 6 7
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.