|
environment(med.fun) <- environment() |
This looks nice & convenient for not worrying about which objects inside mediate() can be referred by med.fun(), but has the negative side-effect that it's not possible to attach a debugger to med.fun():
debugonce(mediation:::med.fun)
mediate(...) # won't debug med.fun!
The workaround would be to add the debug() call inside mediate(), after the environment<- step, which requires re-building the package.
mediation/R/mediate.R
Line 1528 in a9a5c7b
This looks nice & convenient for not worrying about which objects inside
mediate()can be referred bymed.fun(), but has the negative side-effect that it's not possible to attach a debugger tomed.fun():The workaround would be to add the
debug()call insidemediate(), after theenvironment<-step, which requires re-building the package.