While I try to plot histogram in R by defining a set of bins I get this error ‘some ‘x’ not counted; maybe ‘breaks’ do not span range of ‘x”.
I am following the information on the website ‘http://msenux.redwoods.edu/math/R/hist.php’ which states ‘Use the arange command to produce this set of bins’. I tried to search in the internet about how to produce suitable range of bins for my data set but in vain.
Could anyone tell me how its done? or if there is any other way.
I have tried to set the bins as
bins=seq(0,3,by=0.2)
and plot histogram as
hist(log10(a),col=4,breaks=bins)
I suspect that some
log10(a)is outside the range[0,3]. In that case, you can simply do something likeThis ensures that all the values are within the bins.