title: R Why do I keep getting a different number of bins in histogram of means?
body: <p>I am doing a histogram of means, where I sample 25 observations 1000 times. Everything works well apart from the fact that I keep getting a different number of bins.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>samp_25hist&lt;-replicate(1000, {
     samp&lt;-sample(df, 25, replace = F)
     mean(samp)
  })
  hist(samp_25hist, freq = F, breaks = 12,
       main = "Histogram of Means",
       ylab = "Y",
       xlab = "X",
       col = "orange")
  </code></pre>
  
  <p>I tried defining the number of bins, as you can see from the code, but I keep getting either 12, 13, or 14 bins.</p>
  
  <p>Can anyone help me to sort this out?</p>
  
  <p>Thanks!</p>