if k=0 then classes: k = 1 + log(n,2). if k > 0, fixed nclass.
sturges.freq(x, k = 0)
x | vector |
---|---|
k | constant |
Statistics of sturges for a histogram.
Reza A. Hoshmand. 1988. Statistical Methods for Agricultural Sciences, Timber Press, Incorporated, pag 18-21.
library(agricolae) data(natives) classes<-with(natives,sturges.freq(size)) # information of the classes breaks <- classes$breaks breaks#> [1] 0.0010 0.0099 0.0188 0.0277 0.0366 0.0455 0.0544 0.0633 0.0722 0.0811 #> [11] 0.0900 0.0989 0.1078#startgraph # Histogram with the established classes h<-with(natives,graph.freq(size,breaks,frequency=1, col="yellow",axes=FALSE, xlim=c(0,0.12),main="",xlab="",ylab=""))title(main="Histogram of frequency\nSize of the tubercule of the Oca", xlab="Size of the oca", ylab="Frequency")#endgraph