R: ggplot: Error: Unknown parameters: binwidth, bins, pad
<p>I want to do a very simple histogram with ggplot2. I have the following MWE:</p>

<pre><code>library(ggplot2)
mydf &lt;- data.frame(
                  Gene=c("APC","FAT4","XIRP2","TP53","CSMD3","BAI3","LRRK2","MACF1",
                  "TRIO","SETD2","AKAP9","CENPF","ERBB4","FBXW7","NF1","PDE4DIP",
                  "PTPRT","SPEN","ATM","FAT1","SDK1","SMG1","GLI3","HIF1A","ROS1",
                  "BRDT","CDH11","CNTRL","EP400","FN1","GNAS","LAMA1","PIK3CA",
                  "POLE","PRDM16","ROCK2","TRRAP","BRCA2","DCLK1","EVC2","LIFR",
                  "MAST4","NAV3"),
                  Freq=c(48,39,35,28,26,17,17,17,16,15,14,14,14,14,14,14,14,14,13,
                  13,13,13,12,12,12,11,11,11,11,11,11,11,11,11,11,11,11,10,10,10,
                  10,10,10))
mydf
ggplot(mydf, aes(x=Gene)) +
      geom_histogram(aes(y=Freq),
      stat="identity",
      binwidth=.5, alpha=.5,
      position="identity")
</code></pre>

<p>I have always used this simple code to produce this kind of histograms.</p>

<p>In fact, I have the plot for this particular example that I made some time ago...</p>

<p><a href="https://i.stack.imgur.com/4Ceml.png" rel="noreferrer"><img src="https://i.stack.imgur.com/4Ceml.png" alt="enter image description here"></a></p>

<p>However, now I run this exact same code, and I get the following error:</p>

<blockquote>
  <p>Error: Unknown parameters: binwidth, bins, pad</p>
</blockquote>

<p>Why do I find this error now and not before, and what does it mean?</p>

<p>Thanks a lot!</p>