This one is strange. In an R markdown document, every single code cell displays its output without error, but when I try to knit the document into html, I get an error:
Error: stat_bin() must not be used with a y aesthetic. Execution halted
The closest code I could find to the line number and the last cell name to flash by before the error occurred was this:
g + geom_histogram() # default: bins=30 (for diamonds: 5.01 - 0.2 / 30)
g <- ggplot(data = diamonds, aes(x = carat))
g + geom_histogram(binwidth = 1) # not fine grained enough
g + geom_histogram(binwidth = 0.1)
g + geom_histogram(binwidth = 0.01) # too fine grained