I am writing a function that uses some of Rs metaprogramming facilities, including constructing a function call using do.call and a list of arguments.
An issue that has come up is that if i want to include my function in a package, i should refer to functions using namespace::function, rather than importing the package directly. However, do.call("namespace::package",...) does not work. How do i do.call (or call for that matter), with foreign functions inside a package?
I found that this works, but looks inelegant and uses quosures, I am sure a better way exists (just using as an example one of the examples in the do.call documentation):
Hey! Thank you for your answer.
Sorry, i wasn't thinking this through: I forgot that do.call doesn't exclusively take string-arguments but can also be passed a function. This means i can just pass it namespace::function.