title: dmultinom function for Multinomial distribution R
body: <p>The function <code>dmultinom (x, size = NULL, prob, log = FALSE)</code> estimate probabilities of a Multinomial distribution. However, it does not run with size =1.</p>
  
  <p>Theoretically, when setting size=1 the Multinomial distribution should be equivalent to the  Categorical distribution.</p>
  
  <p>Does anybody know why the error message?</p>
  
  <p>FYI, Categorical distribution can be modelled by dist.Categorical {LaplacesDemon}.</p>
  
  <p>Examples:</p>
  
  <p><code>dmultinom(c(1,2,1),size = 1,prob = c(0.3,0.5,0.4))</code></p>
  
  <p>Error in dmultinom(c(1, 2, 1), size = 1, prob = c(0.3, 0.5, 0.4)) : 
    size != sum(x)</p>
  
  <p><code>dcat(c(1,2,1),p = c(0.3,0.5,0.4))</code></p>
  
  <pre><code>[1] 0.3 0.5 0.3
  </code></pre>
  
  <p>Thanks</p>