Skip to content
Prev 286444 / 398502 Next

Finding name of variable supplied as function argument

does the following help Ted?

test <- function(x) {
  actual <- deparse(substitute(x))
  paste('argument passed was called', actual)
}

test(happy)
test(apple)