On Wed, Jun 03, 2009 at 09:00:11PM -0700, Jason Rupert wrote: > > http://n2.nabble.com/What-is-going-on-with-Histogram-Plots-td3022645.html > > For my example I count 7 unique years, however, on the histogram > there only 6. It looks like the bin to the left of the tic mark on > the x-axis represents the number of entries for that year, i.e. > Frequency. > > I guess it looks like the bin for 1990 is missing. Is there a > better way or a different histogram R command to use in order to see > all the age bins and them for them to be aligned directly over the > year tic mark on the x-axis?
hist() is most useful for non-integer data. Each bin represents an interval and for discrete data several values can of course end up in the same bin - just as for floating point numbers. What you want is a graphical representation of counts for discret values (dates) - try plot(table(HouseYear_array)) or barplot(table(HouseYear_array)) instead. cu Philipp -- Dr. Philipp Pagel Lehrstuhl für Genomorientierte Bioinformatik Technische Universität München Wissenschaftszentrum Weihenstephan 85350 Freising, Germany http://webclu.bio.wzw.tum.de/~pagel/ ______________________________________________ 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.