1) match.fun Use match.fun to turn a string into a function. The point . not required.
functions <- c("log", "log10", "sqrt") 10 %>% match.fun(functions[2])(.)
1a) It can also be written as:
10 %>% (match.fun(functions[2])) ## [1] 1
1b) or
10 %>% (functions[2] %>% match.fun) ## [1] 1
2) do.call do.call will also work:
10 %>% { do.call(functions[2], list(.)) }
3) call / eval In general, eval disapproving, but it creates another alternative:
10 %>% call(functions[2], .) %>% eval
source share