I'd like to get argument names from function call:
testFun <- function(x = 1:20, z = list(a = 1, b = 2)) x %>% sin %>% sum
getArgNames <- function(value) {
# function should return all arguments names - in this case c("x", "z")
}
arg.names <- getArgNames(testFun())
And it is important to not to evaluate function before getting argument names. Any ideas?