

   AAcccceessss ttoo aanndd MMaanniippuullaattiioonn ooff tthhee FFoorrmmaall AArrgguummeennttss

        formals(fun=sys.function(sys.parent()))
        formals(obj) <- list

   VVaalluuee::

        If `fun' is a function then the formal argument list to
        that function is returned.  If `fun' is a character
        string then the function with that name is found and
        used.  If `fun' is not specified then the function
        calling `formals' is used.

        The assignment form sets the formals of a function to
        the list on the right hand side.

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

        `args' for a ``human-readable'' version, `alist',
        `body', `function'.

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

        length(formals(lm))      # the number of formal arguments
        names(formals(boxplot))  # formal arguments names

        f <- function(x)a+b
        formals(f) <- alist(a=,b=3) # function(a,b=3)a+b
        f(2) # result = 5

