title: Could not find function inside clusterApply
body: <p>I have this reproducible R snippet</p>
  
  <pre><code>rm(list=ls())
  
  library(doSNOW)
  
  f &lt;- function(a, b) a+b
  g &lt;- function(c) f(c*c, c+c)
  
  v &lt;- c(1, 2, 3, 4, 5, 6)
  
  cl &lt;- makeMPIcluster(1)
  cat( clusterApply(cl, v, g) )
  stopCluster(cl)
  </code></pre>
  
  <p>and I get the following error message:</p>
  
  <pre><code>Error in checkForRemoteErrors(val) : 
    6 nodes produced errors; first error: could not find function "f"
  </code></pre>
  
  <p>I am using R 2.14.1 under Ubuntu. MPI is installed and working. </p>
  
  <p>I know that there is a similar issue for the foreach construct, but it allows to reference functions manually through the .export parameter. I could not find anything similar for clusterApply. Is there a workaround for this?</p>
  
  <p>Thanks!</p>