I have some data on a xlsx file I had succesfully put on a frequency table and the breakspoints were configured correctly with Sturges.
number_observations = length(data)
classes = factor(cut(data, breaks=nclass.Sturges(data)))
tabulation = as.data.frame(table(classes))
tabulation = transform(tabulacion, cumFreq = cumsum(Freq), relative = prop.table(Freq), cumRelative = cumsum(prop.table(Freq)))
% Tabulation display
clases Freq cumFreq relative cumRelative
1 (195,262] xxx xxxx x.xxxxxxx x.xxxxxxx
2 (262,329] yyy yyyy y.yyyyyyy y.yyyyyyy
3 (329,396] zzz zzzz z.zzzzzzz z.zzzzzzz
Now, I need to do a histogram with the same breakpoints, but the problem is that the histogram generated doesn't make the breakpoints correctly, meaning, first, that the maximun and minimun of the data are being presented incorrectly, and second, that the histogram has more classes than the frequency table. For case of this problem, I expect the histogram has 12 classes, but for unknown reasons for me, it makes more.
Any suggestions, and/or idea what I'm doing wrong?