

   AAccttuuaall AArrgguummeennttss

        substitute(expr, env=NULL)
        quote(expr, env=NULL)

   DDeessccrriippttiioonn::

        `substitute' returns the expression which was typed as
        the value of a formal argument.  `quote' is a synonym
        useful to lisp programmers.

   DDeettaaiillss::

        The typical use of this is to create informative labels
        for data sets and plots.  The `myplot' example below
        shows a simple use of this facility.  It uses the func-
        tions `deparse' and `substitute' to create labels for a
        plot which are character string versions of the actual
        arguments to the function `myplot'.

   SSeeee AAllssoo::

        `missing' for argument ``missingness''.

   EExxaammpplleess::

        substitute(expression(a + b), list(a = 1))#> expression(1 + b)

        myplot <- function(x, y)
                plot(x, y, xlab=deparse(substitute(x)),
                        ylab=deparse(substitute(y)))

        ## Simple examples about lazy evaluation, etc:

        f1 <- function(x, y = x)             { x <- x + 1; y }
        s1 <- function(x, y = substitute(x)) { x <- x + 1; y }
        s2 <- function(x, y) { if(missing(y)) y <- substitute(x); x <- x + 1; y }
        a <- 10
        f1(a)# 11
        s1(a)# 11
        s2(a)# a
        typeof(s2(a))# "symbol"

