R – emulate the default behavior of hist() with ggplot2 for bin width
Without sample data, it’s always difficult to get reproducible results, so i’ve created a sample dataset set.seed(16) mydata <- data.frame(myvariable=rnorm(500, 1500000, 10000)) #base histogram hist(mydata$myvariable) As you’ve learned, hist() is a generic function. If you want to see the different implementations you can type methods(hist). Most of the time you’ll be running hist.default. So if … Read more