I'm trying to substitute lapply function with mclapply on a shiny application, with the trace function.
I'm trying to narrow the trace to the used package's namespace, but it is not working.
Most errors are problems of inputs in lapply, either by embedded function in lapply or more than one function as input.
EXAMPLE of Output:
Loading required package: shiny
Tracing function "lapply" in package "base"
Tracing lapply(paths, function(p) { .... on entry
Error in lapply(X, FUN, ...) : argument "FUN" is missing, with no default
Tracing lapply(keys, get, missing) on entry
Error in lapply(X, FUN, ...) : argument "FUN" is missing, with no default
Tracing lapply(x, f) on entry
Tracing lapply(x, f) on entry
Here is how I'm calling trace function:
trace(base::lapply, tracer=substitute(parallel::mclapply(match.call())),where=namespace.vec)
and namespace.vec variable has the used packages namespaces used in the application.
Thank you very much in advance.