density/frequency and probability in hist()
问题 I have used the code hist(x, probability=TRUE) which gives me a y-axis from 0 to 2 with the name density. I dont get what this means. Does it integrate to 1, sum to 1, or what is the y-value equal to? The documentation says "freq = NULL, probability = !freq" but that does not make sense to me. If I dont use probability=TRUE I get Frequency on the y-axis, but the shape of the plot is the same. 回答1: You can save your histogram to a variable and take a look at it. x=rnorm(1000) h<-hist(x) h