title: DEoptim parallel options
body: <p>Hi I am trying to understand how to get DEoptim to work using parallel processing, but am struggling to get the correct parameters to be put into the function to get it to work...below is a reproducible example (it has a financial context) but it is designed for creating a random portfolio of 7 assets to optimise for ES. It was inspired by this <a href="http://mpra.ub.uni-muenchen.de/28187/1/RJwrapper.pdf" rel="nofollow">http://mpra.ub.uni-muenchen.de/28187/1/RJwrapper.pdf</a>  and also <a href="http://files.meetup.com/1772780/20120201_Ulrich_Parallel_DEoptim.pdf" rel="nofollow">http://files.meetup.com/1772780/20120201_Ulrich_Parallel_DEoptim.pdf</a></p>
  
  <p>the second of which does include a parallel option but want to use the unix forking rather than the SOCK clusters.</p>
  
  <pre><code>require(quantmod)
  require(PerformanceAnalytics)
  require(DEoptim)
  
  tickers &lt;- c("^GSPC","^IXIC","^TNX", "DIA","USO","GLD","SLV","UNG","^VIX","F","^FTSE","GS","MS","MSFT","MCD","COKE","AAPL","GOOG","T","C","BHP","RIO","CMG")
  getSymbols(tickers)
  tickers &lt;- gsub("\\^","",tickers)
  
  x &lt;- lapply(tickers, function(x){ClCl(get(x))})
  comb &lt;- na.omit(do.call(merge,x))
  colnames(comb) &lt;- paste0(tickers,".cc")
  
  obj &lt;- function(w) {
   if (sum(w) == 0) { w &lt;- w + 1e-2 }
   w &lt;- w / sum(w)
   CVaR &lt;- ES(weights = w,
   method = "gaussian",
   portfolio_method = "component",
   mu = mu,
   sigma = sigma)
   tmp1 &lt;- CVaR$ES
   tmp2 &lt;- max(CVaR$pct_contrib_ES - 0.225, 0)
   out &lt;- tmp1 + 1e3 * tmp2
  }
  
  comb1 &lt;- comb[,sample(1:ncol(comb),7)]
  no.of.assets &lt;- ncol(comb1)
  mu &lt;- colMeans(comb1)
  sigma &lt;- cov(comb1)
  
  
  ## The non-parallel version
  output &lt;- DEoptim(fn = obj,lower = rep(0, no.of.assets), upper = rep(1, no.of.assets))
  
  ## The parallel version that doesn't seem to work...
  output &lt;- DEoptim(fn = obj,lower = rep(0, no.of.assets), upper = rep(1, no.of.assets), DEoptim.control(itermax=10000, trace=250, parallelType="parallel", packages=c("PerformanceAnalytics"), parVar=c("mu","sigma")))
  </code></pre>
  
  <p>I get the following error message</p>
  
  <pre><code>Error in missing(packages) : 'missing' can only be used for arguments
  </code></pre>