I\'m having trouble making a histogram in R. The problem is that I tell it to make 5 bins but it makes 4 and I tell to make 5 and it makes 8 of them.
data &l
The integer specified as argument for nclass is used as a suggestion:
nclass
the number is a suggestion only
An alternative solution is to cut your vector into a specified number of groups and plot the result:
cut
plot(cut(data, breaks = 4))