Learn R Programming

docopulae (version 0.2.1)

expr2f: Expression To Function

Description

expr2f turns an expression into function(y, theta, ...).

Usage

expr2f(x, map = NULL, yMap = NULL, thetaMap = NULL)

Arguments

x
an expression.
map
a named list of character strings defining left assignments (a="b" => a <- b).
yMap
like map with a=b resolving to a <- y[b].
thetaMap
like map with a=b resolving to a <- theta[[b]].

Value

  • expr2f returns function(y, theta, ...), where theta is a list of parameters. It evaluates expression x.

References

uses substitute_q from http://adv-r.had.co.nz/Computing-on-the-language.html

See Also

buildf, fisherI

Examples

Run this code
## see examples for param

Run the code above in your browser using DataLab