histogram - Use hist() function in R to get percentages as opposed to raw frequencies -


how can 1 plot percentages opposed raw frequencies using hist() function in r?

simply using freq=false argument not give histogram percentages, normalizes histogram total area equals 1.
histogram of percentages of data set, x, do:

h = hist(x) h$density = h$counts/sum(h$counts)*100 plot(h,freq=false) 

basically doing creating histogram object, changing density property percentages, , re-plotting.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -