Skip to content
Prev 48863 / 63421 Next

How to (appropropriately) use require in a package?

Dear Joshua,

Sorry for resurrecting this thread, but I was on holidays earlier. I also had that problem and unfortunately using loadNamespace() as suggested by Prof. Ripley didn't work in my case (the reason is that the cluster is created by the user and the call executed on the cluster can contain additional function calls from the loaded package which are passed by the user).

I settled on the following construct that doesn't seem to raise issues with R CMD check:

junk <- clusterCall(cl = cl, "require", package = "lme4", character.only = TRUE)

Let's hope it continues to not raise any flags.

Best,
Henrik


Am 08.08.2014 09:22, schrieb Joshua Wiley: