I am loading several packages loaded in the global environment in my foreach call using .packages = (.packages())
. However, I could not find how to suppress the package startup messages. As they are loaded for every assigned core, this list gets rather long.
I already tried wrapping the standard calls like suppressMessages()
etc. around the function call and the .packages
argument without success.
foreach(i = x, .packages = (.packages()))
I am using the foreach call within a generic function so it needs to adapt to whatever packages are loaded a priori by the user.
I could just use an apply call inside the foreach call with all the packages loaded in the global environment but I assume foreach
needs it to be loaded in its .packages
argument?
If there is a better way in general how to do this, let me know.