When a function is passed around as an object, it loses its name. See, for example, the results of the following lines:
str(lm)
lm
You can get the arguments and the body of the function, but not the name.
My suggestion would be to construct a named list of functions, where the name could be printed:
> somefns <- list(lm=lm, aggregate=aggregate)
> str(somefns)
List of 2
$ lm :function (formula, data, subset, weights, na.action, method = "qr",
model = TRUE, x = FALSE, y = FALSE, qr = TRUE, singular.ok = TRUE,
contrasts = NULL, offset, ...)
$ aggregate:function (x, ...)
> somefns[[1]](dist ~ speed, data=cars)
Call:
somefns[[1]](formula = dist ~ speed, data = cars)
Coefficients:
(Intercept) speed
-17.58 3.93
> names(somefns)[[1]]
[1] "lm"