title: Option "cores" from package doParallel useless on Windows?
body: <p>On a Linux computer, following <a href="https://cran.r-project.org/web/packages/doParallel/vignettes/gettingstartedParallel.pdf" rel="nofollow noreferrer"><strong>doParallel</strong>'s vignette</a>, I use <code>doParallel::registerDoParallel()</code> and then I use <code>options(cores = N)</code> where <code>N</code> is the number of cores I want to use with <code>foreach</code>. </p>
  
  <p>I can verify with <code>foreach::getDoParWorkers()</code> that when I change the option <code>cores</code>, it automatically changes the number of cores used by <code>foreach</code>.</p>
  
  <p>Yet, on Windows 10 (latest versions of R and packages), this option doesn't seem to have any effect as changing its value doesn't change the value of <code>foreach::getDoParWorkers()</code> (which is initialized at <code>3</code> when calling <code>doParallel::registerDoParallel()</code>).</p>
  
  <p>Reproducible example:</p>
  
  <pre><code>doParallel::registerDoParallel()
  options(cores = 1)
  foreach::getDoParWorkers()
  options(cores = 2)
  foreach::getDoParWorkers()
  options(cores = 4)
  foreach::getDoParWorkers()
  </code></pre>
  
  <p>Is it a bug? Won't it work on Windows?</p>
  
  <p><strong>Edit:</strong> I know how to register parallel backends differently. The goal is to use <code>doParallel::registerDoParallel()</code> registering once (at the loading of my package) and then use an option to change the number of cores used. This is why I want it to work also on Windows.</p>