logo

How to See Histograms in More Detail in R 📂R

How to See Histograms in More Detail in R

Code

In R, you can easily draw a histogram using the hist() function. The size of the class intervals is determined automatically by R, but if you want a more detailed look, you can use the nclalss option.

set.seed(150421)
x<-runif(50)
win.graph(7,4); par(mfrow=c(1,2))
hist(x)
hist(x,nclass=20)

The result of executing the above code is as follows.

12.png