This package provides four functions, namely \code{expression.simplify}, which attempts to resolve as many subexpressions of an expression as possible, \code{function.canonicalize}, which tries to resolve the promises and variables inside a function, \code{function.substitute}, which substitutes a specified subset of the formal parameters of a function with specified values, yielding a function of smaller arity, and \code{function.compose} which combines/chains two functions together. The goal is to be able to produce readable and quicktoevaluate functions, in particular to be able to compose functions iteratively without creating more and more complex entities that depend on different environments and are largely opaque. With this package, you can retain readble functions with as many variables substituted by constants and subexpressions evaluated to constants as possible, which should also speed up the computation of the functions. Additionally, the functions try to replace identical subexpressions by the same object. This can potentially make the function execution more cache friendly. Still, please be aware that this is a hackedtogether early draft version of the package (as indicated by the version number). There may be many border cases where it produces nonsense. Please carefully test whether it does exactly what you want before using it.
Package details 


Author  Dr. Thomas Weise <[email protected]> 
Maintainer  Dr. Thomas Weise <[email protected]> 
License  LGPL3 
Version  0.8.6 
URL  http://github.com/thomasWeise/functionComposeR/ 
Package repository  View on GitHub 
Installation 
Install the latest version of this package by entering the following in R:

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.