Rev 1209 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{as.function}\title{Convert Object to Function}\usage{as.function(x, ...)as.function.default(l, envir = sys.frame(sys.parent()))}\alias{as.function}\alias{as.function.default}\arguments{\item{x}{ object to convert }\item{\dots}{ additional arguments, depending on object }\item{l}{ a list}\item{envir}{environment in which the function should be defined}}\description{\code{as.function} is a generic function which is used to convertobjects to functions.\code{as.function.default} works on a list, which should contain theconcatenation of a formal argument list and an expression or anobject of mode "call" which will become the function body. The functionwill be defined in a specified environment, by default that of thecaller.}\value{The desired function.}\author{Peter Dalgaard }\note{ The \code{alist} function is handy for the construction ofargument lists, etc. }\seealso{\code{alist} }\examples{as.function(alist(a=,b=2,a+b))as.function(alist(a=,b=2,a+b))(3)}\keyword{ programming }%-- one or more ...