Design a main function which determines which secondary function to be used
You could use match.arg and/or match.fun. They are both pretty standard approaches.


match.arg matches an input string to a pre-defined list. It allows for partial matches and handles the error in case it can't find a match.
match.fun is like a smart get for doing "the right thing" depending on the input.


Using match.arg:

square &lt;- function(a, b) sprintf("square(%s, %s)", a, b)
cube   &lt;- function(a, b) sprintf("cube(%s, %s)", a, b)
other  &lt;- function(a, b) sprintf("other(%s, %s)", a, b)

main &lt;- function(a, b, fun = c("square", "cube"), ...) {
   fun &lt;- match.arg(fun)

   # Then, you could do
   # switch(method, square = square(a, b, ...),
   #                cube   = cube(a, b, ...))
   # or use match.fun:

   fun &lt;- match.fun(fun)
   fun(a = a, b = b, ...)
}

main(a = 1, b = 2, fun = "square")
# [1] "square(1, 2)"
main(a = 1, b = 2, fun = square)
# Error in match.arg(fun) : 'arg' must be NULL or a character vector 
main(a = 1, b = 2, fun = "cube")
# [1] "cube(1, 2)"
main(a = 1, b = 2, fun = "sq")  # partial matching
# [1] "square(1, 2)"
main(a = 1, b = 2)
# [1] "square(1, 2)"
main(a = 1, b = 2, fun = "other")
# Error in match.arg(fun) : 'arg' should be one of “square”, “cube”


Using match.fun:

main &lt;- function(a, b, fun, ...) {
   print(fun)
   fun &lt;- match.fun(fun)
   fun(a = a, b = b, ...)
}

main(a = 1, b = 2, fun = "square")
# [1] "square"
# [1] "square(1, 2)"
main(a = 1, b = 2, fun = `square`)
function(a, b) sprintf("square(%s, %s)", a, b)
# [1] "square(1, 2)"
main(a = 1, b = 2, fun = cube)
function(a, b) sprintf("cube(%s, %s)", a, b)
# [1] "cube(1, 2)"
main(a = 1, b = 2, fun = cub)   # no partial matching...
# Error in print(fun) : object 'cub' not found
main(a = 1, b = 2, fun = other)
# function(a, b) sprintf("other(%s, %s)", a, b)
# [1] "other(1, 2)"


As you can see, the two approaches behave a little differently as they may or may not:


allow functions as inputs (e.g. square instead of "square")
allow partial matching of function names
easily restrict the functions that can be used


So it will be up to you to decide based on your requirements.

Note: I have added ... to all your functions in case, in the future, your functions allow differing arguments. As you mentioned, your functions currently all only require a and b so you can get rid of , ... everywhere if you wish.