How can one plot the percentages as opposed to raw frequencies using the hist() function in R?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Simply using the
freq=FALSEargument does not give a histogram with percentages, it normalizes the histogram so the total area equals 1.To get a histogram of percentages of some data set, say x, do:
Basically what you are doing is creating a histogram object, changing the density property to be percentages, and then re-plotting.