title: what exactly does the first argument in makeCluster function do?
body: <p>I am new to r programming as you can tell from the nature of my question. I am trying to take advantage of the parallel computing ability of the train function. </p>
  
  <pre><code>library(parallel)
  #detects number of cores available to use for parallel package
  nCores &lt;- detectCores(logical = FALSE)
  cat(nCores, " cores detected.")  
  
  # detect threads with parallel()
  nThreads&lt;- detectCores(logical = TRUE)
  cat(nThreads, " threads detected.")
  
  # Create doSNOW compute cluster (try 64)
  # One can increase up to 128 nodes
  # Each node requires 44 Mbyte RAM under WINDOWS.
  cluster &lt;- makeCluster(128, type = "SOCK")
  class(cluster);
  </code></pre>
  
  <p>I need someone to help me interpret this code. originally the first argument of <code>makeCluster()</code> had nthreads but after running </p>
  
  <pre><code>nCores &lt;- detectCores(logical = FALSE)
  </code></pre>
  
  <p>I learned that I have 4 threads available. I changed the value based on the message provided in the guide. Will this enable me simultaneously run 128 iterations of the train function at once? If so what is the point of getting the number of threads and cores that my computer has in the first place? </p>