What do you expect to happen to values that fall exactly on the boundary? I have seen questions similar to yours that come about because the user expects different from what the computer does. Look at the 'right' argument to the hist function for a way to change this and see if that helps.
-- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of burgundy > Sent: Monday, April 26, 2010 8:04 PM > To: r-help@r-project.org > Subject: [R] Histogram not plotting correct breaks > > > Hi, > > I'm using the hist function to plot the frequency of 21 variables, but > it > keeps starting the x-axis from 0 and adding variables 1 and 2 together > (all > other vairables have the correct frequencies). I suspect it adds 1 and > 2 > together so that 0 can fit in with demarcations at intervals of 5. > Using > "xlim=c(1,21)" to specify that i don't want to include 0 and using the > "breaks" command to specify 21 breaks doesn't help. Any advice? > Thank you!! > -- > View this message in context: http://r.789695.n4.nabble.com/Histogram- > not-plotting-correct-breaks-tp2066057p2066057.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.