I am having trouble plotting a histogram as a pdf (probability)
I want the sum of all the pieces to equal an area of one so it\'s easier to compare across datasets. For
R has a bug or something. If you have discrete data in a data.frame (with 1 column), and call hist(DF,freq=FALSE) on it, the relative densities will be wrong (summing to >1). This shouldn't happen as far as I can tell.
The solution is to call unlist() on the object first. This fixes the plot.
(I changed the text too, data from http://www.electionstudies.org/studypages/anes_timeseries_2012/anes_timeseries_2012.htm)