search for: funcvec

Displaying 1 result from an estimated 1 matches for "funcvec".

2007 Mar 02
3
from function to its name?
Hi, I can get from a string to a function with this name: >f1 <- function(x){ mean(x) } >do.call("f1",list{1:4}) >get("f1") etc... But how do I get from a function to its name? >funcVec <- c(f1,median) >funcVec [[1]] function(x){ mean(x) } > str(funcVec) List of 2 $ :function (x) ..- attr(*, "source")= chr "function(x){ mean(x) }" $ :function (x, ...) > deparse(funcVec[1]) [1] "list(function (x) " "{" "...