Is there an easy way to precompile functions without running them?


I have a package that has an interface with a database. I want that all functions get precompiled, but I cannot use SnoopCompile, for example, since it requires to actually run the functions. It is not possible here because we need a working database connection, which might not be available when generating the precompilation statements.

What I am doing is calling precompile using the argument types in each function. It works fine, but it is very difficult to create the statements for functions with keyword arguments.

Question: Is there a way to perform this precompilation without running the functions in an easy way as in SnoopCompile?

1 Like